Skip to main content
synthesizeStream emits AudioChunk values as they are produced, so playback can start on the first chunk instead of waiting for the last.

Signature

When it is worth it

For a sentence, speak is simpler and the latency difference is not noticeable. For a paragraph or a model reply being streamed as it generates, streaming synthesis is what keeps the gap between “the model finished thinking” and “the user hears something” short.

Pairing it with a streaming completion

Synthesize each sentence as the LLM finishes it, rather than waiting for the whole reply:
For a full conversation rather than one reply, use the voice session, which handles turn-taking and interruption for you.

Stopping