Where the time goes
A turn is four stages, and they are not equal.
Synthesis dominates, and it dominates for a structural reason worth
understanding before you try to tune anything else.
Synthesis is not incremental
This inverts the intuition people bring from text streaming, where a long answer costs nothing extra up front because the first token arrives immediately either way. Here, reply length is the single biggest lever you have on perceived latency, and it is a lever you pull from the prompt:- Ask for brevity explicitly, and give a limit the model can apply. “Be concise” is advice; “one or two sentences” is a rule.
- Don’t let the model read structure aloud. Bulleted lists, headings and step-by-step numbering are long by construction. If your agent needs to convey a list, have it say the first item and ask whether to continue.
- Push long content out of the voice channel. “I’ve sent that to your email” finishes in a second; reading a policy paragraph does not.
Pace your audio in real time
Send ~20 ms of 16 kHz mono PCM16 per message (640 bytes), at the rate it was recorded. Server-side VAD uses arrival timing to find the end of a turn, so pushing a whole file into the socket at once does not make the answer come faster — it makes endpointing wrong, because everything looks like one continuous burst of speech. A microphone feeding the socket in real time is the case the detector is tuned for.Both directions are 16 kHz, and nothing on the wire checks it. Audio at another
rate is resampled as though it were already 16 kHz — 24 kHz input plays back
1.5× fast and transcription accuracy collapses. It presents as a bad model
rather than as a configuration error. See Realtime.
Cut playback on speech_started, don’t drain
When someone interrupts, generation cancels server-side and queued audio is
dropped. Your client has to do the same thing locally:
Keep sockets short
A realtime session is billed for the time it is connected and it holds a slot against your plan’s concurrency ceiling, so an idle open socket costs money and capacity without doing anything. Open one when a conversation starts and close it when the conversation ends — not when the page unloads. Reconnecting is cheap. Holding thirty sockets open for thirty users who are mostly reading is not.What doesn’t help
Batch synthesis is a different problem
None of this applies toPOST /v1/audio/speech. There you are not racing a
human, so the thing to optimize is throughput: run requests concurrently, split
long text into paragraph-sized pieces so a single failure doesn’t cost you the
whole job, and write straight to disk as the response arrives. See
Streaming to a file.
Going further
Realtime
The protocol, the events, and the sample-rate trap.
Pricing and rate limits
Concurrency ceilings, and what happens when you reach one.