# How does a voice AI agent reply in under a second?

By Vishal Kumar · Published 2026-11-16 · Updated 2026-11-20
Source: https://fungyaan.com/p/voice-ai-agent-latency
Tags: system-design, ai, voice, latency, real-time, llm

**The short answer:** it **streams everything and waits for nothing**. Your audio arrives in 20 ms packets; speech recognition turns it into words *as you speak*; a turn detector decides you've finished; the language model starts generating, and the moment its first phrase is ready, speech synthesis starts saying it while the rest is still being written. The whole loop has a budget of roughly half a second to a second, and the single hardest part isn't the AI at all: it's **deciding when you've stopped talking**.

The first version of the bot was clever. It understood accents, looked up orders, never lost its temper. And callers hated it.

The complaints were vague in the way that only real complaints are: "it felt slow", "it kept talking over me", "I thought it had hung up". The logs showed nothing wrong. Every request succeeded. The model's answers were good. Each component, measured on its own, was fast.

So where did the time go?

> **Case file**
>
> | | |
> |---|---|
> | **The case** | A bot that answers correctly, and still feels broken |
> | **Suspects** | The language model ("it's too slow") |
> | **Culprit** | A pipeline where every stage waited for the previous one to finish, plus a turn detector that waited a full second of silence |
> | **The fix** | Stream every stage, overlap them, and detect the end of a turn faster and smarter |
> | **Evidence** | A timeline of one turn: the model was only a third of the delay |

## The silence you can measure

People are astonishingly fast at taking turns in conversation. A well-known study of ten languages from around the world (Stivers and colleagues, *PNAS*, 2009) found the typical gap between one person finishing and the next starting is around **200 milliseconds**. We start planning our reply before the other person has finished, and we notice, almost physically, when the gap stretches. Past about a second, people start to wonder if the line has dropped.

The first bot ran each stage in sequence. Here is one turn, measured:

| Stage (first version) | Waited for | Time |
|---|---|---|
| Caller stops talking; wait for silence | 1,000 ms of quiet | 1,000 ms |
| Speech recognition finishes the whole utterance | the end of the audio | 400 ms |
| Language model writes the **whole** reply | the last word | 1,400 ms |
| Speech synthesis renders the **whole** reply | the last sound | 700 ms |
| Audio travels back to the caller | network | 100 ms |
| **Caller hears the first word after** | | **3,600 ms** |

Three and a half seconds of silence. The model, the obvious suspect, was 1.4 seconds of it. The real culprit was the shape of the pipeline: **every stage waited for the one before it to finish completely**.

## The pipeline, streamed

```mermaid
sequenceDiagram
  participant C as Caller
  participant T as Telephony / media
  participant S as Speech recognition (streaming)
  participant D as Turn detector
  participant L as Language model (streaming)
  participant V as Speech synthesis (streaming)
  C->>T: Audio, 20 ms packets
  T->>S: Audio stream (WebSocket)
  S-->>D: Partial words, as spoken
  D->>L: "Turn ended" + transcript
  L-->>V: First phrase (tokens stream)
  V-->>T: First audio chunk
  T-->>C: Bot starts speaking
  L-->>V: Rest of the reply, still streaming
  C->>T: Caller interrupts
  T->>V: Stop speaking now (barge-in)
```

Each stage hands over **pieces**, not finished products:

- **Audio in.** The phone system forks the call's audio and streams it to the bot over a WebSocket, usually 8 kHz audio (phone quality) in 20 ms frames, often resampled for the recogniser.
- **Streaming speech recognition** emits partial transcripts as you speak ("I want to", "I want to change", "I want to change my order") and revises them as more audio arrives.
- **The turn detector** decides you've finished. This is the hard bit; it gets its own section below.
- **The language model streams tokens.** What matters is **time to first token**, not total generation time.
- **Streaming speech synthesis** starts speaking as soon as it has a sensible first chunk, such as a phrase or the first clause of a sentence, while the model keeps writing the rest.

## The budget, rebuilt

| Stage (streamed) | What it waits for now | Typical range |
|---|---|---|
| Turn detection | a short pause plus "does this sound finished?" | 200–500 ms |
| Final words from recognition | the last few hundred ms of audio (most was transcribed already) | 50–200 ms |
| Language model, first phrase | time to first tokens | 200–600 ms |
| Speech synthesis, first audio | the first phrase | 100–250 ms |
| Network and telephony, both ways | | 100–200 ms |
| **Caller hears the first word after** | | **~0.7–1.5 s** |

These ranges are illustrative, not a benchmark: they depend on the models, where they run and how far the audio travels. But the shape is the point. Nothing got dramatically faster. Everything **started earlier and overlapped**.

## The hardest problem: knowing you've finished

Here's the mystery inside the mystery. "I'd like to change my order to..." *pause*... "the blue one." If the bot jumps in at the pause, it interrupts. If it waits a full second after every pause, it feels sluggish. Humans resolve this with grammar, intonation and context, all at once.

Voice agents use layers:

- **Voice activity detection** (VAD) tells speech from silence, frame by frame. On its own, it can only say "quiet for N ms".
- **A silence threshold** is the blunt tool: shorter is snappier and interrupts more; longer is polite and slow.
- **Semantic turn detection** is the elegant one: a small model reads the partial transcript and asks "does this sound like a complete turn?" "...to the blue one." looks finished; "I'd like to change my order to..." doesn't. A finished-sounding sentence can end the turn after a short pause; an unfinished one earns a longer wait.

And because recognition is streaming, there's a lovely trick available: **speculative generation**. Start the language model on the partial transcript *before* the turn is confirmed. If the caller keeps talking, throw that work away; if they've finished, the reply is already half-ready. You spend some wasted computation to buy back hundreds of milliseconds.

## Barge-in: letting the caller interrupt

Real people interrupt. A good agent stops talking the instant the caller starts, which is called **barge-in**:

1. Keep listening while the bot speaks.
2. When the caller's speech is detected, **stop playback immediately** and cancel the rest of the generation.
3. Remember what was actually *heard*: if the bot was cut off halfway, the conversation history should say so, or the bot will assume the caller heard things they didn't.

The trap: the bot can hear **its own voice** echoing back down the line and interrupt itself. Echo cancellation in the media path, and ignoring very short bursts of sound, keep it from talking itself into silence.

## Three deployments, three trade-offs

### Case 1: an after-hours booking line

**Situation:** a clinic wants a bot to book and move appointments outside office hours.

**What I'd do:** use hosted streaming speech services and a fast, small model; a narrow task doesn't need the biggest model, and a smaller one has a quicker first token. Give it tools (find slot, book, cancel), confirm every booking by reading it back, and hand over to a voicemail or callback when it isn't sure. Measure **time to first audio** on every turn, not just accuracy.

### Case 2: a high-volume support line in many languages

**Situation:** thousands of calls an hour, several languages, cost per minute matters.

**What I'd do:** run recognition, the model and synthesis **close to the telephony servers**, in the same region or the same data centre, because every network hop is spent twice. Self-hosting models becomes worth considering at this volume for cost and latency, and sometimes for data-residency rules. Keep connections to every model warm; a cold start on the first turn is the one users remember.

### Case 3: an agent that must hand over to humans

**Situation:** the bot handles simple questions, and anything unusual goes to a person.

**What I'd do:** make the handover a first-class path, not a failure. Pass the transcript and a one-line summary to the agent's screen as the call is transferred, so the caller never repeats themselves. The best voice bots are judged by their worst minute, and that minute is usually the handover.

## Choosing an architecture

| | Cascade (speech → text → model → speech) | Speech-to-speech model |
|---|---|---|
| **What it fixes** | Each stage swappable and inspectable; text you can log, filter and test | Fewer hops; can hear tone and respond with natural prosody |
| **What it costs** | Several services to run and tune together | Less control; harder to inspect and test each step |
| **How it fails** | Latency adds up across stages; errors compound | Harder to see *why* it said something |
| **Pick it when** | You need tools, compliance logging, guardrails | Natural conversation matters more than control |

Most production phone agents in late 2026 are still cascades, because businesses need the transcript, the tool calls and the audit trail.

> **Remember this**
> - Stream every stage and overlap them; don't make any stage wait for a finished product.
> - Optimise time to first audio, not total time.
> - Turn detection is the hardest problem: combine silence, a semantic check and speculative generation.

## What to measure on Monday

1. **Time to first audio** per turn, at p50 and p95, from the caller's last word.
2. **Interruptions per call**: how often the bot talks over people, and how often people talk over it.
3. **Turn detection errors**: replies that started mid-sentence.
4. **Handover rate and reasons**: where the bot gave up, and whether the human got the context.
5. **Where each stage runs**: every region hop costs you on the way out and on the way back.

What delights me about this problem is that the solution is less about faster machines and more about manners. A good voice agent listens while it talks, starts thinking before you've finished, knows the difference between a pause and an ending, and stops the instant you need it to. We built it out of streams and models, but what we were really building was a sense of timing.
