Measuring voice-to-voice latency
/AI/4 min read
Voice-to-voice latency is the gap a person actually hears. A server that logs 620 ms is delivering about 800 ms over WebRTC and 1,020 ms over a phone line — and estimating the 95th percentile from 50 calls can land anywhere from 1,154 to 1,578 ms.
Voice-to-voice latency is the time from the moment a user stops speaking to the moment they hear the agent begin to reply. It is the single number that most determines whether a voice agent feels like a conversation or like a phone menu.
It is also easy to measure wrongly. The usual mistakes are measuring at the wrong place, defining the start and end inconsistently, and drawing conclusions from too few turns.
Measure at the ears, not the server
The convenient measurement is server-side: log when the speech-to-text stream says the user stopped, log when the first TTS audio packet goes out, subtract. That number leaves out everything between the user's mouth and the server, and between the server and the user's ear:
| segment | WebRTC in a browser | phone call (PSTN) |
|---|---|---|
| microphone capture and encoding | 20 ms | 20 ms |
| uplink network | 40 | 150 |
| server-side, as logged | 620 | 620 |
| downlink network | 40 | 150 |
| client jitter buffer | 60 | 60 |
| decoding and playback | 20 | 20 |
| what the user hears | 800 ms | 1,020 ms |
The server reports 620 ms in both cases. The user on a browser experiences 800 and the user on a phone line over a second. Phone networks add substantial delay in each direction through carriers, gateways and transcoding — a cost that never appears in server logs.
Server-side timings are still essential for finding which component is slow. But the headline number must be measured end to end.
How to measure end to end
Record both sides of real calls, as two separate audio channels, with a shared clock. Then, for each turn:
- Find where the user's speech ends on the user channel.
- Find where the agent's speech begins on the agent channel.
- Subtract.
For testing, a simulated caller works well: a script that plays recorded user utterances into the agent over the same path a real caller uses — through the phone network or a real browser — and records what comes back.
Define "stopped speaking" once
The end of the user's speech is not a sharp event. Speech trails off into breath and room noise. Different detectors place the end at different points, often tens to hundreds of milliseconds apart.
That matters because the same definition must be used for every measurement you compare. An energy-threshold detector with a long tail will make every agent look 100 ms faster than one that marks the last syllable. Pick one method — ideally marking the end of the last word, which is what a listener perceives — and use it everywhere, including when comparing against vendors' claims.
The start of the agent's reply has the same problem in reverse: some TTS outputs begin with a few milliseconds of near-silence. Mark the first audible sound, not the first packet.
Report distributions, and enough of them
Latency varies turn to turn, so a single average hides what users experience. Report at least the median and the 95th percentile, and ideally the 99th: one or two long silences in a call are what people remember.
The 95th percentile needs a lot of turns to estimate. Simulating an agent whose true p95 is 1,423 ms and estimating it from samples of different sizes:
| turns measured | range of p95 estimates (middle 90%) |
|---|---|
| 50 | 1,154 – 1,578 ms |
| 200 | 1,299 – 1,536 ms |
| 1,000 | 1,368 – 1,475 ms |
With 50 turns, the estimate can be off by over 250 ms in either direction — larger than most of the improvements a team is trying to detect. Comparing two configurations on 50 turns each is mostly comparing noise. A few hundred turns per configuration is the minimum for decisions; a thousand for confidence in the tail.
Break it down per turn
Alongside the end-to-end number, log a timestamp at every stage boundary for every turn — end of speech detected, transcript final, first token, first sentence, first audio sent. When the end-to-end p95 moves, the per-stage breakdown shows which stage moved it. Without that, a regression in the LLM provider and a regression in the telephony route look identical.
Also slice by condition: phone versus browser, region, time of day, conversation length. Latency on the tenth turn of a long call — with a long prompt for the model to process — is often noticeably worse than on the first.
What to take away
Voice-to-voice latency is the silence the user hears, measured from the end of their speech to the start of the agent's audio at their ear. Server logs leave out capture, network and playback: 620 ms on the server is about 800 ms in a browser and 1,020 ms on a phone line.
Measure end to end with recordings or a simulated caller, use one consistent definition of when speech ended, and collect enough turns: a p95 from 50 turns can be 250 ms off in either direction.