Streaming
The ElevenLabs API supports real-time audio streaming for select endpoints, 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.
Our official Node and Python libraries include utilities to simplify handling this continuous audio stream.
Streaming is supported for the Text to Speech API, Voice Changer API & Audio Isolation API. This section focuses on how streaming works for requests made to the Text to Speech API.
In Python, a streaming request looks like:
In Node / Typescript, a streaming request looks like: