Skip to main content
Use text to speech for short previews, dialogue lines, and production audio generation.

Single request

Batching multiple lines

For dialogue, send one request per line and concatenate the audio. This keeps responses small, allows parallel calls, and limits retries to failed segments. Use async jobs or HTTP streaming when you already have complete text for each line. Use realtime WebSocket when your product is generating and speaking turns during a live conversation.

Realtime conversation

Realtime text to speech keeps one WebSocket connection open across multiple turns. It is optimized for voice agents, live chat, and barge-in flows where avoiding a new HTTP connection per turn matters.
Realtime audio is fixed to pcm_s16le, 24000 Hz, mono, 16-bit. It does not accept output_format; request mp3 or wav from the HTTP endpoints when you need encoded files.

Tuning expressive controls

Combine instructions with voice_settings to control delivery per call. guidance_scale adjusts how strongly generation follows those instructions and the reference voice. The accepted range is 1.0 to 10.0. Write instructions in Chinese for Chinese TTS. For English and every other speech language, including Japanese, Korean, Spanish, and French, write instructions in English. The API, SDKs, CLI, and realtime WebSocket do not translate TTS instructions automatically, which keeps high-volume generation latency predictable. The Instruction Enhance endpoint improves an instruction in the same language you supplied; it does not translate it for inference.

Async jobs

Keep sync and streaming calls for short previews. Use async jobs for long text, reference-heavy voices, or batch production so the caller can poll status and download the audio after generation completes.

Inspecting the result

The logs page shows inline playback, a download link, and Copy as cURL.

Continue building

Convert text to speech

Inspect request fields, SDK examples, response bodies, and generated errors.

CLI text to speech

Generate, stream, and save speech from the terminal with breeze tts.

Streaming

Use the streaming endpoint when playback should begin before the full response is ready.

Realtime text to speech

Keep one WebSocket open across live conversation turns.

Output formats

Pick an encoding for browser playback, post-processing, or low-latency audio pipelines.

Managing history

List previous generations, download audio, and delete test runs.