WebSockets

Handshake

GET

Path parameters

voice_idstringRequired

The unique identifier for the voice to use in the TTS process.

Query parameters

model_idstringOptional

The model ID to use

language_codestringOptional

The ISO 639-1 language code (for Turbo v2.5 and Flash v2.5 models only)

enable_loggingstringOptional

Whether to enable logging of the request

enable_ssml_parsingbooleanOptionalDefaults to false

Whether to enable SSML parsing

optimize_streaming_latencyenumOptionalDefaults to mp3_44100

Latency optimization level (deprecated)

output_formatenumOptionalDefaults to mp3_44100

The output audio format

inactivity_timeoutdoubleOptionalDefaults to 20

Timeout for inactivity before connection is closed

sync_alignmentbooleanOptionalDefaults to false

Whether to include timing data with every audio chunk

auto_modebooleanOptionalDefaults to false

This parameter focuses on reducing the latency by disabling the chunk schedule and all buffers. It is only recommended when sending full sentences or phrases, sending partial phrases will result in highly reduced quality. By default it’s set to false.

Send

Initialize Connectionobject
OR
Send Textobject
OR
Close Connectionobject

Receive

Audio Outputobject
OR
Final Outputobject
Built with