Streaming
Murf TTS API supports real-time streaming capabilities, allowing developers to generate and play text-to-speech (TTS) audio dynamically as it is being generated in real-time, reducing the time-to-first-byte. This ensures minimal latency, making it ideal for conversational AI, real-time applications, and voice-enabled assistants.
New: Pass model = falcon-2 to use our Falcon 2 model in text-to-speech
streaming endpoints, designed for ultra-low latency (~130 ms).
In addition to HTTP streaming endpoint, Murf TTS supports Websocket streaming which enables bidirectional streaming for real-time audio generation.
Quickstart
Streaming enables returning raw audio bytes (e.g., MP3 data) directly over HTTP using chunked transfer encoding. This allows clients to process or play audio incrementally as it is generated. This section focuses on how streaming works for requests made to the Text to Speech API.
Getting Started
Generate an API key here. 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.
Initiating a Streaming Request
Python SDK
REST API
Install the Python SDK and PyAudio
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
Linux (Debian/Ubuntu)
Windows
Once you have installed PortAudio, you can install the required Python packages using the following command:
Make the API Call with Real-Time Playback
Once you have the SDK and PyAudio installed, and the API key set as an environment variable, you are ready to make your first streaming API call with real-time audio playback.
Falcon 2 Supported Voices
English - US & Canada
English - UK
English - India
English - Australia
French - France
French - Canada
German - Germany
Spanish - Mexico
Spanish - Spain
Italian - Italy
Portuguese - Brazil
Mandarin - China
Dutch - Netherlands
Hindi - India
Korean - Korea
Tamil - India
Polish - Poland
Bangla - India
Japanese - Japan
Gujarati - India
Kannada - India
Malayalam - India
Marathi - India
Punjabi - India
Telugu - India
Endpoint & Concurrency Overview
The Global Router automatically picks the nearest region automatically.The concurrency limit is 15 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.
Available Regions
Use the region closest to your users for the lowest latency.
FAQs
What is Falcon 2?
Falcon 2 is our fastest streaming model (~130 ms latency) optimized for real-time interactions.
Who should use Falcon 2?
Use Falcon 2 when your top priority is ultra-low latency. Typical fits include: - Conversational agents & live support where snappy turn-taking matters. - Real-time apps (IVR, gaming, tutoring, assistive tech) that stream audio as users speak. - Interruptible/barge-in experiences and interactive demos or prototyping.
How do I enable Falcon 2?
Include model = falcon-2 in your request (HTTP or WebSocket). If omitted,
the default streaming model is used.
What features are supported in streaming mode?
In streaming mode, you can control the voice, style, pitch, speed, and locale in both Gen2 and Falcon 2 models. The Gen2 model also supports pause tags.
What audio format will this support
- We support MP3, FLAC, WAV, ALAW, ULAW, OGG, and PCM. - If you need to transmit audio as text, you can Base64-encode any of these.