> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://murf.ai/api/docs/text-to-speech/web-sockets/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://murf.ai/api/docs/_mcp/server. Murf TTS API supports [WebSocket streaming](/api/docs/api-reference/text-to-speech/stream-input), enabling low-latency, bidirectional communication over a persistent connection. It's designed for building responsive voice experiences like interactive voice agents, live conversations, and other real-time applications. > **Note** > > New: Pass model = `falcon-2` to use our Falcon 2 model in text-to-speech > streaming endpoints, designed for ultra-low latency (\~100 ms). WebSocket > streaming supports Falcon only. With a single WebSocket connection, you can stream text input and receive synthesized audio continuously, without the overhead of repeated HTTP requests. This makes it ideal for use cases where your application sends or receives text in chunks and needs real-time audio to deliver a smooth, conversational experience. ![Simple WebSocket Connection](/api/docs/_fern-img/e45b8ea71835a6ea912fceaccea2e95d5fd0f57ce4942285b15f521f8dcb826b.webp) ## Endpoint ``` wss://global.api.murf.ai/v1/speech/stream-input ``` `global` geo-routes your connection to the nearest datacenter. Use it unless you have a data-residency requirement, in which case pin to a regional host such as `wss://in.api.murf.ai/v1/speech/stream-input` — see [Available Regions](#available-regions) for the full list. > **Warning** > > `api.murf.ai` is a legacy alias that always resolves to us-east and does not > geo-route. Note also that `/v1/speech/stream-input` is the WebSocket path; > `/v1/speech/stream` is the HTTP streaming endpoint. ### Quickstart This guide walks you through setting up and making your first WebSocket streaming request. #### Getting Started Generate an API key [here](https://murf.ai/api/dashboard). Store the key in a secure location, as you'll need it to authenticate your requests. You can optionally save the key as an environment variable in your terminal. **`macOS / Linux`** ```bash title="macOS / Linux" # Export an environment variable on macOS or Linux systems export MURF_API_KEY="your_api_key_here" ``` **`Windows`** ```bash title="Windows" # Export an environment variable in PowerShell setx MURF_API_KEY "your_api_key_here" ``` #### Install required packages This guide uses the `websockets` and `pyaudio` Python packages. The `websockets` package is essential for the core functionality. > **Note:** `pyaudio` is used in this quickstart guide to demonstrate playing the audio received from the WebSocket. However, it is not required to use Murf WebSockets if you have a different method for handling or playing the audio stream. `pyaudio` depends on `PortAudio`, you may need to install it first. #### Installing PortAudio (for PyAudio) `PyAudio` depends on `PortAudio`, a cross-platform audio I/O library. You may need to install `PortAudio` separately if it's not already on your system. #### macOS ```bash brew install portaudio ``` #### Linux (Debian/Ubuntu) ```bash sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 ``` #### Windows `PortAudio` is often bundled with Python distributions like Anaconda. If you encounter issues, you might need to download `PortAudio` binaries or install them via a package manager like Chocolatey: ```bash choco install portaudio ``` Alternatively, refer to the [official PyAudio documentation](https://people.csail.mit.edu/hubert/pyaudio/#downloads) for Windows installation instructions. Once you have installed `PortAudio`, you can install the required Python packages using the following command: **`Install Python packages`** ```bash title="Install Python packages" pip install websockets pyaudio ``` #### Streaming Text and Playing Synthesized Audio ```py import asyncio import websockets import json import base64 import pyaudio # import os API_KEY = "YOUR_API_KEY" # Or use os.getenv("MURF_API_KEY") if you have set the API key as an environment variable WS_URL = "wss://global.api.murf.ai/v1/speech/stream-input" CONTEXT_ID = "quickstart-1" PARAGRAPH = "With a single WebSocket connection, you can stream text input and receive synthesized audio continuously, without the overhead of repeated HTTP requests. This makes it ideal for use cases where your application sends or receives text in chunks and needs real-time audio to deliver a smooth, conversational experience" # Audio format settings (must match your API output) SAMPLE_RATE = 24000 CHANNELS = 1 FORMAT = pyaudio.paInt16 async def tts_stream(): async with websockets.connect( f"{WS_URL}?api-key={API_KEY}&model=falcon-2&sample_rate=24000&channel_type=MONO&format=WAV" ) as ws: # Send voice config first, before any text voice_config_msg = { "voice_config": { "voiceId": "Gordon", "locale":"en-US", "style": "Conversation", "rate": 0, "pitch": 0 }, "context_id": CONTEXT_ID } print(f'Sending payload : {voice_config_msg}') await ws.send(json.dumps(voice_config_msg)) # Use the same context ID on the text frame text_msg = { "text": PARAGRAPH, "end": True, # This closes the context and frees its concurrency slot "context_id": CONTEXT_ID } print(f'Sending payload : {text_msg}') await ws.send(json.dumps(text_msg)) # Setup audio stream pa = pyaudio.PyAudio() stream = pa.open(format=FORMAT, channels=CHANNELS, rate=SAMPLE_RATE, output=True) first_chunk = True try: while True: response = await ws.recv() data = json.loads(response) print(f'Received data: {data}') if "audio" in data: audio_bytes = base64.b64decode(data["audio"]) # Only the first chunk of a context carries the WAV header if first_chunk and len(audio_bytes) > 44: audio_bytes = audio_bytes[44:] first_chunk = False stream.write(audio_bytes) if data.get("error"): print(f'Error {data["error_code"]}: {data["error"]}') if data.get("fatal"): break if data.get("warning"): print(f'Warning {data["warning_code"]}: {data["warning"]}') if data.get("final"): break finally: stream.stop_stream() stream.close() pa.terminate() if __name__ == "__main__": asyncio.run(tts_stream()) ``` ## Choosing a voice Choose a voice from the [Falcon 2 Supported Voices](#falcon-2-supported-voices) section. What matters is that the voice exists in the **Falcon** catalog. An unknown voice returns an `INVALID_VOICE` error with `"fatal": true`, and the message points you to `GET /v1/speech/voices?model=FALCON`. ### Using voice settings with Context IDs A `context_id` does not alter the values in `voice_config`; it determines which independent context owns those settings. If you include a `context_id` on a text frame, send a `voice_config` frame with the same `context_id` first. A configuration sent without `context_id` belongs only to the default context, so named contexts do not inherit it. Text sent to an unconfigured named context uses the default voice and produces a `NO_VOICE_CONFIG` warning. The context keeps its configured settings for its lifetime, even if you later change the default context's configuration. For a single default stream, you can omit `context_id` from both frames. See [Context ID](/text-to-speech/web-sockets/context-id) for multi-turn and interruption examples. ## Audio format and the WAV header With `format=WAV`, the **first** audio chunk of a context starts with a 44-byte WAV header whose RIFF-size and data-size fields are `0xFFFFFFFF` — the "length unknown, read to end of stream" sentinel — because the total length isn't known mid-stream. Only the first chunk has it. * **Playing progressively:** feed the bytes straight to a streaming decoder. It honours the sentinel. * **Saving to a file:** strip the first 44 bytes, concatenate the rest, then write your own header with the real length. Otherwise players show a bogus duration and can't seek. * **Avoiding it entirely:** request `format=PCM` for headerless little-endian 16-bit samples. ## Field naming Request fields accept both `snake_case` and `camelCase` (`context_id`/`contextId`, `min_buffer_size`/`minBufferSize`, `max_buffer_delay_in_ms`/`maxBufferDelayInMs`, `predictive_chunking`/`predictiveChunking`, `add_word_timestamps`/`addWordTimestamps`). Responses are always `snake_case`. Note that `voice_config` itself uses camelCase inside (`voiceId`, `volumeOffset`, and other voice settings), which is why both spellings are accepted at the top level. > **Warning** > > `predictive_chunking`, `min_buffer_size`, `max_buffer_delay_in_ms` and > `add_word_timestamps` are **top-level siblings of `text`**, not members of > `voice_config`. Nesting them inside `voice_config` fails silently. See > [Advanced Settings](/text-to-speech/web-sockets/advanced-settings). ## Machine-readable schema Every frame, field and query parameter is defined in the [WebSockets API reference](/api/docs/api-reference/text-to-speech/stream-input), generated from our AsyncAPI document. Use it when generating a client. ## Falcon 2 Supported Voices #### [Find your Perfect Voice](https://murf.ai/api/products/text-to-speech/Falcon?utm_source=murf_api_docs) Explore, preview, and select from 150+ voices in 20+ expressive styles #### English - US & Canada | Voice ID | Supported Locales | Voice Styles | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- | | Alicia | en-US (English - US & Canada) | Conversation | | Alina | en-US (English - US & Canada) | Conversation | | Amara | en-US (English - US & Canada) | Conversational | | Ariana | en-US (English - US & Canada) | Conversation | | Caleb | en-US (English - US & Canada) | Conversation | | Daisy | en-US (English - US & Canada) | Conversation | | Daniel | en-US (English - US & Canada) | Conversation | | Edmund | en-US (English - US & Canada) | Conversation | | Ezekiel | en-US (English - US & Canada) | Conversational | | Gordon | en-US (English - US & Canada) | Conversational | | Grant | en-US (English - US & Canada) | Conversational | | Jonathan | en-US (English - US & Canada), tr-TR (Turkish - Turkey) | Conversational | | Josie | en-US (English - US & Canada) | Conversation | | Judith | en-US (English - US & Canada) | Conversational | | Luna | en-US (English - US & Canada) | Conversation | | Madison | en-US (English - US & Canada) | Conversational | | Matthew | en-US (English - US & Canada) | Conversation | | Michelle | en-US (English - US & Canada) | Conversation | | Miles | en-US (English - US & Canada) | AIAgent, Customer Support Agent | | Molly | en-US (English - US & Canada) | Conversation | | Natalie | en-US (English - US & Canada) | Conversation | | Wayne | en-US (English - US & Canada) | Conversation | | Will | en-US (English - US & Canada) | Conversation | | Zion | en-US (English - US & Canada) | Conversation | | Bertie | en-US (English - US & Canada), en-UK (English - UK), tr-TR (Turkish - Turkey) | Conversational | | Blazej | en-US (English - US & Canada), pl-PL (Polish - Poland) | Conversational | | Carlos | en-US (English - US & Canada), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), es-MX (Spanish - Mexico), fr-FR (French - France), it-IT (Italian - Italy), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), th-TH (Thai - Thailand), tl-PH (Tagalog - Philippines) | Conversational | | Carmen | en-US (English - US & Canada), es-ES (Spanish - Spain) | Conversation | | Elvira | en-US (English - US & Canada) | Conversation | | Heidi | en-US (English - US & Canada), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), en-UK (English - UK), es-MX (Spanish - Mexico), nl-BE (Dutch - Belgium), sv-SE (Swedish - Sweden), tl-PH (Tagalog - Philippines), tr-TR (Turkish - Turkey) | Conversational | | Isadora | en-US (English - US & Canada), pt-BR (Portuguese - Brazil) | Conversation | | Joshua | en-US (English - US & Canada), en-UK (English - UK), es-MX (Spanish - Mexico), fr-FR (French - France) | Conversational | | Lara | en-US (English - US & Canada), de-DE (German - Germany), es-MX (Spanish - Mexico) | Conversational | | Merel | en-US (English - US & Canada), nl-NL (Dutch - Netherlands) | Conversational | | Nimisha | en-US (English - US & Canada), en-IN (English - India), ml-IN (Malayalam - India) | Conversational | #### English - UK | Voice ID | Supported Locales | Voice Styles | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | | Benedict | en-UK (English - UK) | Conversational | | Bertie | en-UK (English - UK), en-US (English - US & Canada), tr-TR (Turkish - Turkey) | Conversational | | Freddie | en-UK (English - UK) | Conversational | | Hazel | en-UK (English - UK) | Conversational | | Heidi | en-UK (English - UK), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), en-US (English - US & Canada), es-MX (Spanish - Mexico), nl-BE (Dutch - Belgium), sv-SE (Swedish - Sweden), tl-PH (Tagalog - Philippines), tr-TR (Turkish - Turkey) | Conversational | | Hugo | en-UK (English - UK) | Conversational | | Joshua | en-UK (English - UK), en-US (English - US & Canada), es-MX (Spanish - Mexico), fr-FR (French - France) | Conversational | | Juliet | en-UK (English - UK) | Conversational | | Lydia | en-UK (English - UK) | Conversational | | Mason | en-UK (English - UK) | Conversational | | Pearl | en-UK (English - UK) | Conversational | | Ruby | en-UK (English - UK) | Conversational | | Sharon | en-UK (English - UK) | Conversational | | Theo | en-UK (English - UK) | Narration | #### English - India | Voice ID | Supported Locales | Voice Styles | | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Aarav | en-IN (English - India), hi-IN (Hindi - India) | Conversation | | Abhinav | en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), ml-IN (Malayalam - India), mr-IN (Marathi - India), tr-TR (Turkish - Turkey) | Conversational | | Anisha | en-IN (English - India), as-IN (Assamese - India), bn-IN (Bangla - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), mr-IN (Marathi - India), or-IN (Odia - India), pa-IN (Punjabi - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversation | | Anusha | en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), te-IN (Telugu - India) | Conversational | | Nikhil | en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), kn-IN (Kannada - India) | Conversational | | Pooja | en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), id-ID (Indonesian - Indonesia), kn-IN (Kannada - India), ms-MY (Malay - Malaysia), ta-IN (Tamil - India), te-IN (Telugu - India), vi-VN (Vietnamese - Vietnam) | Conversational | | Priya | en-IN (English - India), hi-IN (Hindi - India) | Conversational | | Samar | en-IN (English - India), ar-XA (Arabic - XA), as-IN (Assamese - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), kn-IN (Kannada - India), mr-IN (Marathi - India), or-IN (Odia - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversational | | Hardik | en-IN (English - India), gu-IN (Gujarati - India), te-IN (Telugu - India) | Conversation | | Nimisha | en-IN (English - India), en-US (English - US & Canada), ml-IN (Malayalam - India) | Conversation | | Prathamesh | en-IN (English - India), gu-IN (Gujarati - India), mr-IN (Marathi - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversation | #### English - Australia | Voice ID | Supported Locales | Voice Styles | | -------- | --------------------------- | -------------- | | Harper | en-AU (English - Australia) | Conversational | | Ivy | en-AU (English - Australia) | Conversational | | Jimm | en-AU (English - Australia) | Conversational | | Leyton | en-AU (English - Australia) | Conversational | | Sophia | en-AU (English - Australia) | Narration | #### French - France | Voice ID | Supported Locales | Voice Styles | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Adélie | fr-FR (French - France) | Conversation | | Axel | fr-FR (French - France), es-MX (Spanish - Mexico) | Conversational | | Guillaume | fr-FR (French - France) | Conversational | | Justine | fr-FR (French - France) | Conversation | | Carlos | fr-FR (French - France), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), en-US (English - US & Canada), es-MX (Spanish - Mexico), it-IT (Italian - Italy), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), th-TH (Thai - Thailand), tl-PH (Tagalog - Philippines) | Conversation | | Diya | fr-FR (French - France), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), gu-IN (Gujarati - India), id-ID (Indonesian - Indonesia), it-IT (Italian - Italy), ml-IN (Malayalam - India), mr-IN (Marathi - India), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), tr-TR (Turkish - Turkey), vi-VN (Vietnamese - Vietnam) | Conversation | | Joshua | fr-FR (French - France), en-UK (English - UK), en-US (English - US & Canada), es-MX (Spanish - Mexico) | Conversation | #### French - Canada | Voice ID | Supported Locales | Voice Styles | | -------- | ----------------------- | -------------- | | Alexis | fr-CA (French - Canada) | Conversational | | Clément | fr-CA (French - Canada) | Conversational | #### German - Germany | Voice ID | Supported Locales | Voice Styles | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Björn | de-DE (German - Germany), vi-VN (Vietnamese - Vietnam) | Conversational | | Josephine | de-DE (German - Germany) | Conversational | | Lara | de-DE (German - Germany), en-US (English - US & Canada), es-MX (Spanish - Mexico) | Conversational | | Matthias | de-DE (German - Germany) | Conversational | | Ralf | de-DE (German - Germany) | Conversational | | Carlos | de-DE (German - Germany), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), en-US (English - US & Canada), es-MX (Spanish - Mexico), fr-FR (French - France), it-IT (Italian - Italy), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), th-TH (Thai - Thailand), tl-PH (Tagalog - Philippines) | Conversation | | Diya | de-DE (German - Germany), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), fr-FR (French - France), gu-IN (Gujarati - India), id-ID (Indonesian - Indonesia), it-IT (Italian - Italy), ml-IN (Malayalam - India), mr-IN (Marathi - India), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), tr-TR (Turkish - Turkey), vi-VN (Vietnamese - Vietnam) | Conversation | | Heidi | de-DE (German - Germany), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), en-UK (English - UK), en-US (English - US & Canada), es-MX (Spanish - Mexico), nl-BE (Dutch - Belgium), sv-SE (Swedish - Sweden), tl-PH (Tagalog - Philippines), tr-TR (Turkish - Turkey) | Conversation | | Javier | de-DE (German - Germany), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), es-ES (Spanish - Spain), es-MX (Spanish - Mexico), id-ID (Indonesian - Indonesia), it-IT (Italian - Italy), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania) | Conversation | #### Spanish - Mexico | Voice ID | Supported Locales | Voice Styles | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | | Carlos | es-MX (Spanish - Mexico), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), en-US (English - US & Canada), fr-FR (French - France), it-IT (Italian - Italy), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), th-TH (Thai - Thailand), tl-PH (Tagalog - Philippines) | Conversational | | Luisa | es-MX (Spanish - Mexico) | Conversational | | Valeria | es-MX (Spanish - Mexico) | Conversational | | Axel | es-MX (Spanish - Mexico), fr-FR (French - France) | Conversation | | Heidi | es-MX (Spanish - Mexico), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), en-UK (English - UK), en-US (English - US & Canada), nl-BE (Dutch - Belgium), sv-SE (Swedish - Sweden), tl-PH (Tagalog - Philippines), tr-TR (Turkish - Turkey) | Conversation | | Javier | es-MX (Spanish - Mexico), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), es-ES (Spanish - Spain), id-ID (Indonesian - Indonesia), it-IT (Italian - Italy), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania) | Conversation | | Joshua | es-MX (Spanish - Mexico), en-UK (English - UK), en-US (English - US & Canada), fr-FR (French - France) | Conversation | | Lara | es-MX (Spanish - Mexico), de-DE (German - Germany), en-US (English - US & Canada) | Conversation | #### Spanish - Spain | Voice ID | Supported Locales | Voice Styles | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | | Carmen | es-ES (Spanish - Spain), en-US (English - US & Canada) | Conversational | | Javier | es-ES (Spanish - Spain), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), es-MX (Spanish - Mexico), id-ID (Indonesian - Indonesia), it-IT (Italian - Italy), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania) | Conversational | #### Italian - Italy | Voice ID | Supported Locales | Voice Styles | | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Angelo | it-IT (Italian - Italy) | Conversational | | Greta | it-IT (Italian - Italy) | Conversational | | Vincenzo | it-IT (Italian - Italy) | Conversational | | Carlos | it-IT (Italian - Italy), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), en-US (English - US & Canada), es-MX (Spanish - Mexico), fr-FR (French - France), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), th-TH (Thai - Thailand), tl-PH (Tagalog - Philippines) | Conversation | | Diya | it-IT (Italian - Italy), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), fr-FR (French - France), gu-IN (Gujarati - India), id-ID (Indonesian - Indonesia), ml-IN (Malayalam - India), mr-IN (Marathi - India), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), tr-TR (Turkish - Turkey), vi-VN (Vietnamese - Vietnam) | Conversation | | Javier | it-IT (Italian - Italy), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), es-ES (Spanish - Spain), es-MX (Spanish - Mexico), id-ID (Indonesian - Indonesia), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania) | Conversation | #### Portuguese - Brazil | Voice ID | Supported Locales | Voice Styles | | -------- | ---------------------------------------------------------- | -------------- | | Benício | pt-BR (Portuguese - Brazil) | Conversational | | Eloa | pt-BR (Portuguese - Brazil) | Conversational | | Gustavo | pt-BR (Portuguese - Brazil) | Conversational | | Heitor | pt-BR (Portuguese - Brazil) | Conversational | | Isadora | pt-BR (Portuguese - Brazil), en-US (English - US & Canada) | Conversational | | Silvio | pt-BR (Portuguese - Brazil) | Conversational | | Yago | pt-BR (Portuguese - Brazil) | Conversational | #### Mandarin - China | Voice ID | Supported Locales | Voice Styles | | -------- | ------------------------------------------------------ | -------------- | | Jiao | zh-CN (Mandarin - China), vi-VN (Vietnamese - Vietnam) | Conversational | | Tao | zh-CN (Mandarin - China) | Conversational | | Wei | zh-CN (Mandarin - China) | Conversational | | Yuxan | zh-CN (Mandarin - China) | Conversational | #### Dutch - Netherlands | Voice ID | Supported Locales | Voice Styles | | -------- | ---------------------------------------------------------- | -------------- | | Dirk | nl-NL (Dutch - Netherlands) | Conversational | | Famke | nl-NL (Dutch - Netherlands) | Conversational | | Merel | nl-NL (Dutch - Netherlands), en-US (English - US & Canada) | Conversational | #### Hindi - India | Voice ID | Supported Locales | Voice Styles | | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Aman | hi-IN (Hindi - India) | Conversational | | Ayushi | hi-IN (Hindi - India), gu-IN (Gujarati - India), hi-LATN (Hinglish - India), te-IN (Telugu - India) | Conversation | | Karan | hi-IN (Hindi - India) | Conversational | | Khyati | hi-IN (Hindi - India) | Conversational | | Namrita | hi-IN (Hindi - India), kn-IN (Kannada - India), tr-TR (Turkish - Turkey) | Conversational | | Shweta | hi-IN (Hindi - India) | Conversational | | Sunaina | hi-IN (Hindi - India) | Conversational | | Aarav | hi-IN (Hindi - India), en-IN (English - India) | Conversation | | Abhik | hi-IN (Hindi - India) | Conversation | | Abhinav | hi-IN (Hindi - India), en-IN (English - India), hi-LATN (Hinglish - India), ml-IN (Malayalam - India), mr-IN (Marathi - India), tr-TR (Turkish - Turkey) | Conversational | | Abirami | hi-IN (Hindi - India), te-IN (Telugu - India) | Conversation | | Alia | hi-IN (Hindi - India), te-IN (Telugu - India) | Conversational | | Anisha | hi-IN (Hindi - India), as-IN (Assamese - India), bn-IN (Bangla - India), en-IN (English - India), hi-LATN (Hinglish - India), mr-IN (Marathi - India), or-IN (Odia - India), pa-IN (Punjabi - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversational | | Anusha | hi-IN (Hindi - India), en-IN (English - India), hi-LATN (Hinglish - India), te-IN (Telugu - India) | Conversational | | Arnab | hi-IN (Hindi - India) | Conversation | | Arohi | hi-IN (Hindi - India) | Conversational | | Eashwar | hi-IN (Hindi - India) | Conversation | | Isha | hi-IN (Hindi - India) | Conversational | | Ishani | hi-IN (Hindi - India) | Conversation | | Karthikeyan | hi-IN (Hindi - India), gu-IN (Gujarati - India), hi-LATN (Hinglish - India), ml-IN (Malayalam - India), ta-IN (Tamil - India) | Conversation | | Madhavan | hi-IN (Hindi - India), ml-IN (Malayalam - India) | Conversational | | Nikhil | hi-IN (Hindi - India), en-IN (English - India), hi-LATN (Hinglish - India), kn-IN (Kannada - India) | Conversational | | Pooja | hi-IN (Hindi - India), en-IN (English - India), hi-LATN (Hinglish - India), id-ID (Indonesian - Indonesia), kn-IN (Kannada - India), ms-MY (Malay - Malaysia), ta-IN (Tamil - India), te-IN (Telugu - India), vi-VN (Vietnamese - Vietnam) | Conversational | | Priya | hi-IN (Hindi - India), en-IN (English - India) | Conversational | | Samar | hi-IN (Hindi - India), ar-XA (Arabic - XA), as-IN (Assamese - India), en-IN (English - India), hi-LATN (Hinglish - India), kn-IN (Kannada - India), mr-IN (Marathi - India), or-IN (Odia - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversational | | Sarvesh | hi-IN (Hindi - India), kn-IN (Kannada - India) | Conversation | | Vaibhav | hi-IN (Hindi - India), mr-IN (Marathi - India) | Conversational | #### Korean - Korea | Voice ID | Supported Locales | Voice Styles | | -------- | ------------------------------------------------------ | -------------- | | Gyeong | ko-KR (Korean - South Korea) | Conversational | | Hwan | ko-KR (Korean - South Korea) | Conversation | | Jangmi | ko-KR (Korean - South Korea) | Conversational | | Jong-su | ko-KR (Korean - South Korea) | Conversation | | Minseo | ko-KR (Korean - South Korea), ja-JP (Japanese - Japan) | Conversational | | Seok | ko-KR (Korean - South Korea) | Conversational | #### Tamil - India | Voice ID | Supported Locales | Voice Styles | | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Karthikeyan | ta-IN (Tamil - India), gu-IN (Gujarati - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), ml-IN (Malayalam - India) | Conversational | | Anisha | ta-IN (Tamil - India), as-IN (Assamese - India), bn-IN (Bangla - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), mr-IN (Marathi - India), or-IN (Odia - India), pa-IN (Punjabi - India), te-IN (Telugu - India) | Conversational | | Pooja | ta-IN (Tamil - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), id-ID (Indonesian - Indonesia), kn-IN (Kannada - India), ms-MY (Malay - Malaysia), te-IN (Telugu - India), vi-VN (Vietnamese - Vietnam) | Conversational | | Prathamesh | ta-IN (Tamil - India), en-IN (English - India), gu-IN (Gujarati - India), mr-IN (Marathi - India), te-IN (Telugu - India) | Conversation | | Samar | ta-IN (Tamil - India), ar-XA (Arabic - XA), as-IN (Assamese - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), kn-IN (Kannada - India), mr-IN (Marathi - India), or-IN (Odia - India), te-IN (Telugu - India) | Conversational | #### Polish - Poland | Voice ID | Supported Locales | Voice Styles | | -------- | ------------------------------------------------------ | -------------- | | Blazej | pl-PL (Polish - Poland), en-US (English - US & Canada) | Conversational | | Jacek | pl-PL (Polish - Poland) | Conversational | | Kasia | pl-PL (Polish - Poland) | Conversational | #### Bangla - India | Voice ID | Supported Locales | Voice Styles | | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Debarati | bn-IN (Bangla - India) | Conversational | | Subhankar | bn-IN (Bangla - India), mr-IN (Marathi - India) | Conversational | | Anisha | bn-IN (Bangla - India), as-IN (Assamese - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), mr-IN (Marathi - India), or-IN (Odia - India), pa-IN (Punjabi - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversational | #### Japanese - Japan | Voice ID | Supported Locales | Voice Styles | | -------- | ------------------------------------------------------ | -------------- | | Denki | ja-JP (Japanese - Japan) | Conversational | | Kenji | ja-JP (Japanese - Japan) | Conversation | | Kimi | ja-JP (Japanese - Japan) | Conversational | | Minseo | ja-JP (Japanese - Japan), ko-KR (Korean - South Korea) | Conversational | #### Gujarati - India | Voice ID | Supported Locales | Voice Styles | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Diya | gu-IN (Gujarati - India), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), fr-FR (French - France), id-ID (Indonesian - Indonesia), it-IT (Italian - Italy), ml-IN (Malayalam - India), mr-IN (Marathi - India), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), tr-TR (Turkish - Turkey), vi-VN (Vietnamese - Vietnam) | Conversational | | Hardik | gu-IN (Gujarati - India), en-IN (English - India), te-IN (Telugu - India) | Conversational | | Ayushi | gu-IN (Gujarati - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), te-IN (Telugu - India) | Conversation | | Karthikeyan | gu-IN (Gujarati - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), ml-IN (Malayalam - India), ta-IN (Tamil - India) | Conversation | | Prathamesh | gu-IN (Gujarati - India), en-IN (English - India), mr-IN (Marathi - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversation | #### Kannada - India | Voice ID | Supported Locales | Voice Styles | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | | Harshitha | kn-IN (Kannada - India) | Conversational | | Harman | kn-IN (Kannada - India), pa-IN (Punjabi - India) | Conversation | | Namrita | kn-IN (Kannada - India), hi-IN (Hindi - India), tr-TR (Turkish - Turkey) | Conversational | | Nikhil | kn-IN (Kannada - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India) | Conversation | | Pooja | kn-IN (Kannada - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), id-ID (Indonesian - Indonesia), ms-MY (Malay - Malaysia), ta-IN (Tamil - India), te-IN (Telugu - India), vi-VN (Vietnamese - Vietnam) | Conversation | | Samar | kn-IN (Kannada - India), ar-XA (Arabic - XA), as-IN (Assamese - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), mr-IN (Marathi - India), or-IN (Odia - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversational | | Sarvesh | kn-IN (Kannada - India), hi-IN (Hindi - India) | Conversation | #### Malayalam - India | Voice ID | Supported Locales | Voice Styles | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | | Madhavan | ml-IN (Malayalam - India), hi-IN (Hindi - India) | Conversation | | Nimisha | ml-IN (Malayalam - India), en-IN (English - India), en-US (English - US & Canada) | Conversation | | Abhinav | ml-IN (Malayalam - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), mr-IN (Marathi - India), tr-TR (Turkish - Turkey) | Conversation | | Diya | ml-IN (Malayalam - India), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), fr-FR (French - France), gu-IN (Gujarati - India), id-ID (Indonesian - Indonesia), it-IT (Italian - Italy), mr-IN (Marathi - India), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), tr-TR (Turkish - Turkey), vi-VN (Vietnamese - Vietnam) | Conversation | | Karthikeyan | ml-IN (Malayalam - India), gu-IN (Gujarati - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), ta-IN (Tamil - India) | Conversation | #### Marathi - India | Voice ID | Supported Locales | Voice Styles | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Prajakta | mr-IN (Marathi - India), te-IN (Telugu - India) | Conversational | | Prathamesh | mr-IN (Marathi - India), en-IN (English - India), gu-IN (Gujarati - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversational | | Vaibhav | mr-IN (Marathi - India), hi-IN (Hindi - India) | Conversational | | Abhinav | mr-IN (Marathi - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), ml-IN (Malayalam - India), tr-TR (Turkish - Turkey) | Conversational | | Anisha | mr-IN (Marathi - India), as-IN (Assamese - India), bn-IN (Bangla - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), or-IN (Odia - India), pa-IN (Punjabi - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversational | | Diya | mr-IN (Marathi - India), ar-XA (Arabic - XA), bg-BG (Bulgarian - Bulgaria), cs-CZ (Czech - Czech Republic), de-DE (German - Germany), fr-FR (French - France), gu-IN (Gujarati - India), id-ID (Indonesian - Indonesia), it-IT (Italian - Italy), ml-IN (Malayalam - India), ms-MY (Malay - Malaysia), nl-BE (Dutch - Belgium), ro-RO (Romanian - Romania), sv-SE (Swedish - Sweden), tr-TR (Turkish - Turkey), vi-VN (Vietnamese - Vietnam) | Conversational | | Harpreet | mr-IN (Marathi - India), pa-IN (Punjabi - India) | Conversational | | Samar | mr-IN (Marathi - India), ar-XA (Arabic - XA), as-IN (Assamese - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), kn-IN (Kannada - India), or-IN (Odia - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversational | | Subhankar | mr-IN (Marathi - India), bn-IN (Bangla - India) | Conversational | #### Punjabi - India | Voice ID | Supported Locales | Voice Styles | | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Harman | pa-IN (Punjabi - India), kn-IN (Kannada - India) | Conversational | | Harpreet | pa-IN (Punjabi - India), mr-IN (Marathi - India) | Conversational | | Anisha | pa-IN (Punjabi - India), as-IN (Assamese - India), bn-IN (Bangla - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), mr-IN (Marathi - India), or-IN (Odia - India), ta-IN (Tamil - India), te-IN (Telugu - India) | Conversational | #### Telugu - India | Voice ID | Supported Locales | Voice Styles | | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | Abirami | te-IN (Telugu - India), hi-IN (Hindi - India) | Conversation | | Alia | te-IN (Telugu - India), hi-IN (Hindi - India) | Conversation | | Anisha | te-IN (Telugu - India), as-IN (Assamese - India), bn-IN (Bangla - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), mr-IN (Marathi - India), or-IN (Odia - India), pa-IN (Punjabi - India), ta-IN (Tamil - India) | Conversational | | Anusha | te-IN (Telugu - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India) | Conversational | | Ayushi | te-IN (Telugu - India), gu-IN (Gujarati - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India) | Conversation | | Hardik | te-IN (Telugu - India), en-IN (English - India), gu-IN (Gujarati - India) | Conversational | | Pooja | te-IN (Telugu - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), id-ID (Indonesian - Indonesia), kn-IN (Kannada - India), ms-MY (Malay - Malaysia), ta-IN (Tamil - India), vi-VN (Vietnamese - Vietnam) | Conversation | | Prajakta | te-IN (Telugu - India), mr-IN (Marathi - India) | Conversational | | Prathamesh | te-IN (Telugu - India), en-IN (English - India), gu-IN (Gujarati - India), mr-IN (Marathi - India), ta-IN (Tamil - India) | Conversational | | Samar | te-IN (Telugu - India), ar-XA (Arabic - XA), as-IN (Assamese - India), en-IN (English - India), hi-IN (Hindi - India), hi-LATN (Hinglish - India), kn-IN (Kannada - India), mr-IN (Marathi - India), or-IN (Odia - India), ta-IN (Tamil - India) | Conversational | ## Available Regions Use the region closest to your users for the lowest latency. | Region (City/Area) | Endpoint | | ------------------------------------- | ----------------------------------------------------- | | Global (Routes to the nearest server) | `wss://global.api.murf.ai/v1/speech/stream-input` | | US-East | `wss://us-east.api.murf.ai/v1/speech/stream-input` | | US-West | `wss://us-west.api.murf.ai/v1/speech/stream-input` | | India | `wss://in.api.murf.ai/v1/speech/stream-input` | | Canada | `wss://ca.api.murf.ai/v1/speech/stream-input` | | South Korea | `wss://kr.api.murf.ai/v1/speech/stream-input` | | UAE | `wss://me.api.murf.ai/v1/speech/stream-input` | | Japan | `wss://jp.api.murf.ai/v1/speech/stream-input` | | Australia | `wss://au.api.murf.ai/v1/speech/stream-input` | | EU (Central) | `wss://eu-central.api.murf.ai/v1/speech/stream-input` | | UK | `wss://uk.api.murf.ai/v1/speech/stream-input` | | South America (São Paulo) | `wss://sa-east.api.murf.ai/v1/speech/stream-input` | > **Note** > > The **Global Router** picks the nearest region automatically. The > concurrency limit is **5** for the **US-East** > region and **2** for all other regions. To get higher > concurrency, use the **US-East** endpoint directly or contact us > to increase limits for regional endpoints. ## Best Practices Following are some best practices for using the WebSocket streaming API: * Send `voice_config` before any `text`. When using a named context, put the same `context_id` on both frames. Text that arrives in an unconfigured context is synthesized with the default voice and returns a `NO_VOICE_CONFIG` warning. * Branch on `error_code` and `warning_code`, never on the human-readable message. See [Errors & Warnings](/api/docs/text-to-speech/errors). * Once connected, the session remains active as long as it is in use and will automatically close after 3 minutes of inactivity. * You can maintain up to 10X your streaming concurrency limit in WebSocket connections, as per your plan's [rate limits](/api/docs/resources/rate-limits). * For the lowest latency, prefer Falcon 2 voices by setting **model** = `falcon-2`. * If you use LiveKit or Pipecat, turn off the framework's sentence tokenizer or text aggregation and stream LLM tokens straight to the WebSocket. Falcon does its own sentence splitting. * For how to write text for Falcon, including numbers, codes, scripts and an LLM system prompt template, see [Best Practices](/api/docs/resources/best-practices#streaming-and-chunking). ## Next Steps #### [Context ID](/text-to-speech/web-sockets/context-id) Use a unique identifier to track a specific TTS request, ensuring continuity in the conversation. #### [Advanced Settings](/text-to-speech/web-sockets/advanced-settings) Balance latency and naturalness with predictive chunking, and get word-level timestamps. #### [Errors & Warnings](/text-to-speech/errors) Every error and warning code the streaming and WebSocket APIs can return, with the cause and the fix. ## FAQs #### How is WebSocket streaming different from HTTP streaming in the Murf TTS API? WebSocket allows you to stream input text and receive audio over the same persistent connection, making it truly bidirectional. In contrast, HTTP streaming is one-way, you send the full text once and receive audio while it is being generated. WebSocket is better for real-time, interactive use cases where text arrives in parts. #### What format is the audio received over WebSocket? The audio is streamed as a sequence of base64-encoded strings, with each message containing a chunk of the overall audio. With `format=WAV`, only the first chunk of a context carries a 44-byte header, and its length fields are placeholders. Request `format=PCM` to receive headerless little-endian 16-bit samples instead. #### After how long will the WebSocket connection close due to inactivity? The WebSocket connection will automatically close after 3 minutes of inactivity. #### What features can I use with the WebSocket Streaming API? You can control style, speed, pitch and pauses. You can also tune latency with predictive chunking and receive word-level timestamps. See [Advanced Settings](/text-to-speech/web-sockets/advanced-settings). #### How do I enable Falcon 2 over WebSockets, and who should use it? Add **model** = `falcon-2` to your WebSocket connection query (or request parameters). Falcon 2 is optimized for ultra-low latency (\~100 ms) and is ideal for interactive agents, live support, gaming, tutoring, and other real-time experiences where fast turn-taking matters. WebSocket streaming supports Falcon only. #### What happens if my API key is invalid? The HTTP upgrade completes and the connection is then closed with WebSocket code **1008** (policy violation). It is not an HTTP 401, so handle the close code. See [Errors & Warnings](/api/docs/text-to-speech/errors). ## Docs - [Context ID](https://murf.ai/api/docs/text-to-speech/web-sockets/context-id.md) - [Advanced Settings](https://murf.ai/api/docs/text-to-speech/web-sockets/advanced-settings.md): Balance latency and naturalness with predictive chunking, and get word-level timestamps over WebSockets.