Turn-based Speech (Flux)
Turn-based Speech (Flux)
Streaming, turn-based text-to-speech (Flux TTS) built for voice-agent pipelines. Stream LLM tokens in, speak them to the user, and report per-turn billing and timing.
Turn-based Speech (Flux)
Streaming, turn-based text-to-speech (Flux TTS) built for voice-agent pipelines. Stream LLM tokens in, speak them to the user, and report per-turn billing and timing.
Use Authorization: Token <API_KEY>
Example: Authorization: Token 12345abcdef
Use Authorization: Bearer <JWT>
Example: Authorization: Bearer eyJhbGciOiJ...
The Flux TTS model used to synthesize speech. Required on every connection. Model strings follow the format flux-{voice}-{language} (e.g. flux-alexis-en). An Aura model string is rejected on /v2/speak; use /v1/speak for Aura voices.
Encoding of the raw output audio. The streaming WebSocket emits raw (non-containerized) audio, so only streaming-compatible encodings are supported. Compressed and containerized encodings (mp3, opus, flac, aac) are available on the batch REST transport only.
Output sample rate in Hz. With linear16, valid values are 8000, 16000, 24000, 32000, 44100, and 48000. With mulaw or alaw, valid values are 8000 and 16000. Defaults to the model’s native sample rate.
Receive per-turn billing and timing after a manual Flush
Receive a warning; synthesis continues and the connection is unaffected
Use your API key or a temporary token for authentication via the Authorization header. In client-side environments where custom headers are not supported, use the Sec-WebSocket-Protocol header instead.
Example: Authorization: Token %DEEPGRAM_API_KEY% or Authorization: Bearer %DEEPGRAM_TOKEN%
Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip