Hello? Are you still there?
A pharmacy chain puts an agent on its refill line. Ruth calls, says I'd like to refill my blood pressure tablets, the ones from Dr. Haas, stops, and waits. From that moment the one thing she can judge is how long the line stays quiet before the agent starts to answer. Whether the whole answer took two seconds or six to produce matters much less: once the voice has started, she is listening, not waiting.
Studies of conversation in many languages find that people usually answer each other within a fraction of a second. The team sets its target from that: 800 ms from the moment Ruth stops speaking to the first sound of the agent's voice. How her audio reaches the servers, over the phone network or WebRTC from the pharmacy's app, is Realtime media: WebRTC, SFUs & NAT traversal; this article starts where the audio arrives.
Three quick stages, one slow turn
The first version is the obvious chain: speech-to-text (STT) turns her audio into text, a language model writes the reply, and text-to-speech (TTS) turns the reply into audio. Each stage is fast on its own. The turn is not, because each stage waits for the complete output of the one before. Give each stage an illustrative time, not a measurement of any provider:
- The session waits for 700 ms of silence, to be sure Ruth has finished.
- STT transcribes the recording of her whole sentence: 300 ms.
- The model writes its whole reply, 45 words: 200 ms before the first token, then about 1.4 s for the rest.
- TTS synthesises all 45 words before any of them plays: 600 ms.
- The phone network and the hops between services, both ways: 100 ms.
That adds up to 3.3 seconds of silence. No component is broken, and Ruth has said hello? twice. Most of that time, a stage sits idle with work it could already have started.
Each stage starts on the last one's first output
A streaming STT service receives her audio in small frames, typically 20 ms each, while she talks, and sends back partial transcripts that it revises as more audio arrives, then a final one. By the time Ruth stops, nearly all of the text already exists, and the final transcript follows in about 80 ms instead of 300.
The model streams its tokens too (passing them through the gateway is in Serving LLMs: gateways, fallback & token budgets), and the voice session does not wait for the reply to end. It cuts the token stream at the first sentence boundary, Sure, let me check., and hands that sentence to a streaming TTS, which returns its first audio about 120 ms later, while the model is still writing the second sentence. The length of the first sentence is now part of the latency, so the prompt asks for a short one. Sending the first reply to a smaller, faster model is a per-request choice covered in Model routing & cascades: the cheapest model that can answer.
The voice session sits in the middle: partial transcripts come back to it while Ruth is still talking, it sends the model's first sentence to TTS while the rest is written, and audio flows back to it in chunks. Each label reads what goes out / what comes back.
The new ledger, still illustrative: 700 ms of silence, 80 for the final transcript, 300 for the model's first sentence (200 to its first token, then about 100 for the rest of Sure, let me check.), 120 for the first audio, 100 for the network. That is 1.3 seconds, and the biggest item left is not a stage at all: it is the wait to decide that Ruth has finished.
Finished, or reading out a number?
That decision has two parts. Voice activity detection (VAD) labels each frame of audio as speech or not, and endpointing declares the turn over after a stretch of silence. Cut the silence threshold to 200 ms and the ledger lands on 800. Then Ruth reads her prescription number off the bottle: four four seven… a pause while she finds her glasses… two nine one eight. At 200 ms the agent answers four four seven with I couldn't find that prescription, over the rest of her number.
Raising the threshold for everyone gives back the time it saved. Semantic endpointing asks a different question: does what she has said so far sound complete? A small model reads the partial transcript, and in some systems the intonation of the audio, and estimates whether the utterance is over. The ones from Dr. Haas. is complete, so a short silence ends the turn; four four seven is three of the seven digits the question asked for, so the session waits longer, up to a second and a half. It is a prediction, so it errs both ways. Ending early interrupts slow speakers and costs a repair turn; ending late is dead air on every turn. The threshold is a product decision, and it can differ between a question that expects a yes and one that expects seven digits.
When Ruth talks over the agent
Your refill is ready at the Elm Street store. It's open until nine tonight, and the drive-through window… Ruth: Elm Street's fine, thanks. Speaking over the agent is barge-in, and an agent that talks through it sounds like a recording. TTS produces audio faster than it plays, so several seconds may already be queued in the phone leg when she starts. Stopping cleanly takes four steps, in order:
- VAD, still running on Ruth's audio during playback, hears speech that lasts longer than a short minimum, so a cough does not stop the agent; some systems also weigh the words, so an mm-hm does not either.
- The session clears its own playback queue and, where the telephony interface supports it, asks the provider to clear the audio it has buffered; whatever sits in a buffer it cannot clear still plays.
- The session cancels the TTS request and the model's generation, which may still be writing.
- The session cuts the agent's reply in the conversation history at the last word Ruth actually heard.
The last step is the one teams forget. The model wrote three sentences; Ruth heard one and a half. If the history keeps all three, the model believes it told her about the drive-through window and will refer to it later. The session knows roughly how much audio played, from playback marks the phone leg sends back or its own clock, and TTS services that return word timings let it map that position back to text. The agent's own voice must not count as barge-in either: on a speakerphone it comes back through the caller's microphone, and echo cancellation on the device or in the media path removes most of it.
Moving her pickup to another store is a tool call, one more round trip inside the turn, and what has to be checked before it runs is in Agent guardrails: checking tool calls & human approval.
One model, audio in and audio out
Speech-to-speech models collapse the chain: one model takes the caller's audio and produces the agent's audio, usually over a single streaming connection, and several handle turn detection and interruptions themselves. Fewer hand-offs can mean less latency, and the model hears tone and hesitation that a transcript drops.
What the chain gives the pharmacy is text in the middle. Before TTS speaks a reply, the session can check that a dosage read back matches the prescription record, or that a required sentence is there, word for word. With a speech-to-speech model, the words exist as text only if it also returns a transcript, or after the audio is transcribed, and checking them before the caller hears them means holding the audio back, which spends some or all of the time the single model saved. Each stage of the chain can also be swapped on its own, say for an STT that handles drug names well. Some teams use speech-to-speech for open conversation and keep the chain where the exact words matter.
A timestamp at every hand-off
The pharmacy's first dashboard measured from the final transcript to the first audio and looked healthy while callers complained: it missed both ends of the silence Ruth hears, the endpointing wait and the playback. The session now stamps each turn when the caller stops speaking, when the turn is declared over, at the final transcript, the first token, the first sentence sent to TTS and the first audio played. The gaps are the ledger, turn by turn, best read as one trace across the services (Distributed tracing) and as percentiles rather than averages: one turn in twenty stalled on a slow provider is a caller hearing three seconds of nothing, and Latency percentiles & tail latency explains why the mean hides it.
In the Real-Time Voice Agent Challenge the 800 ms is a requirement, not a goal, and a design for it convinces only as far as its split does: how many milliseconds each stage gets, where the end of the turn is decided, and what the voice session cancels when the caller talks over the agent.