Streaming audio
Streaming response format
Whenstream: true, the API returns a stream of server-sent events.
Audio chunk:
alignment=word):
When streaming is enabled, only
raw (PCM) format is supported. For non-streaming requests, you can use mp3, wav, or raw.Output raw bytes
If you want to extract raw audio bytes (for example, to feed into a custom audio pipeline), use the settings below.test2.pcm file.
See also
- Text-to-speech overview for parameters, response formats, voices, and pricing.
- WebSocket API for the lowest-latency, bidirectional streaming option.