output_format query parameter selects the audio encoding for HTTP text-to-speech requests. Non-streaming text to speech accepts mp3, wav, flac, pcm, aac, and opus. HTTP streaming text to speech accepts pcm, mp3, and wav; when omitted, streaming defaults to pcm to reduce time to first audio.
Realtime text to speech over WebSocket does not accept output_format. It always streams pcm_s16le, 24000 Hz, mono, 16-bit audio as binary frames.
Supported encodings
Choosing a format
- End-user playback in a browser or app: prefer
mp3. - One-shot low-latency playback: use the HTTP streaming endpoint with the default
pcmresponse for lower TTFA. - Realtime conversation: use the WebSocket realtime endpoint. The audio format is fixed to
pcm_s16le, 24000 Hz, mono, 16-bit. - File-oriented streaming workflows: request
wavormp3. - Archival or post-processing: use
wavorflacfor lossless non-streaming output.
Use formats with
SDK quickstart
Generate and save your first MP3 with the Python or TypeScript SDK.
Text to speech
Pass
output_format on sync, async, and streaming generation requests.Convert text to speech
See where
output_format fits among the request parameters, with SDK examples.Streaming
Use streaming-compatible formats for lower-latency playback.
Realtime text to speech
Build realtime conversation audio with fixed PCM binary frames.
CLI text to speech
Save generated audio from the command line while prototyping voices and formats.

