Why does a good voice assistant feel like a conversation, while a bad one feels like talking to a fax machine? The difference rarely comes down to the language model’s intelligence. It comes down to architecture: how audio moves, where latency hides, and how the system decides when you have finished speaking. This article walks through the real-time voice AI architecture behind modern voice agents, from the microphone to the speaker, with the trade-offs engineers actually face.
What “Real-Time” Really Means in Voice AI
Human conversation sets a brutal bar. A widely cited study of turn-taking across ten languages found that the typical gap between one speaker finishing and the next starting is around 200 milliseconds. That number, from the PNAS study on universals and cultural variation in turn-taking, is the target every voice agent is chasing, even if most never reach it.
In practice, vendors in 2023 and 2024 commonly aimed for sub-one-second end-to-end response latency as a design target. Treat that figure as a goal, not a measured standard. What matters architecturally is the budget: every component in the chain, from audio capture to speech synthesis, spends part of it. The engineering job is deciding where to spend and where to cheat.
The Two Dominant Architectures: Cascade vs. End-to-End

Almost every deployed voice assistant falls into one of two camps.
| Aspect | Cascaded pipeline | End-to-end speech-to-speech |
|---|---|---|
| Components | ASR, language model, TTS, turn detection, each separate | One model takes audio in, emits audio out |
| Latency profile | Adds a hop at each stage | Fewer hops, but heavier per-second compute |
| Debuggability | Each stage inspectable and testable | Harder to trace where things went wrong |
| Control | Swap vendors per stage; enforce text filters | Limited hooks between input and output |
| Compute cost | Generally lower per second of audio | Typically higher per second of audio |
The cascade remains the workhorse. Speech recognition turns audio into text, a language model produces a reply, and text-to-speech voices it. Each stage can be tuned, replaced, or logged independently, which is why enterprises like it. The cost is latency: three or four sequential steps stack up.
End-to-end models skip the text bottleneck entirely. GPT-4o’s May 2024 demo made this approach famous, and it can sound startlingly natural. The trade-off is less controllability and harder debugging. There is no clean text transcript to inspect mid-flight, and enforcing content rules becomes murkier.
Neither wins outright. Many production systems now blend the two, using an end-to-end model for conversational flow while keeping text-based guardrails alongside it.
The Latency Budget: Where Milliseconds Go
A useful mental model is a budget with fixed line items. Audio capture and encoding cost a few milliseconds. Network transit adds more. Speech recognition, if it waits for a complete utterance, can cost hundreds of milliseconds on its own. The language model’s time-to-first-token matters more than its total generation time. Speech synthesis adds its own delay unless it streams.
Telephony engineers have thought about this for decades. The classic guidance in ITU-T G.114 on one-way transmission time puts most voice applications under 150 milliseconds one-way before quality suffers. Voice AI inherits that intuition, though conversational turn-taking is more forgiving than a live phone call because users expect some thinking time. (ITU-T: international telecommunication standards overview)
The practical lesson: measure time-to-first-audio, not total response time. A system that starts speaking in 600 milliseconds and finishes in three seconds feels faster than one that stays silent for 1.2 seconds and then delivers everything at once. Perceived responsiveness lives at the front of the response, not the back.
Streaming Is the Core Constraint, Not a Feature
The single biggest architectural decision is whether every component streams. Real-time systems process audio in small chunks, often frames of 20 to 100 milliseconds, and run recognition, generation, and synthesis incrementally rather than waiting for complete utterances.
This is why streaming APIs dominate voice-agent designs. The WebSocket protocol, standardized as IETF RFC 6455, provides the full-duplex channel most speech vendors expose for streaming recognition and synthesis. If a component only accepts a complete file and returns a complete file, it does not belong in a real-time path.
Streaming speech synthesis deserves special attention. Modern neural TTS can emit the first audio chunk before the full sentence is synthesized. That single capability often buys more perceived speed than any model upgrade. A common mistake is optimizing the language model while leaving a batch-mode TTS in the chain; the bottleneck sits at the end, not the middle.
For teams weighing where streaming fits against offline processing, a comparison of batch versus real-time inference helps clarify which workloads genuinely need the streaming path and which can wait.
Turn Detection: The Hardest Unsolved Problem
Deciding when a user has finished speaking is a distinct problem from understanding what they said, and it trips up more deployments than any model choice. Three approaches dominate:
- Voice activity detection (VAD) flags speech versus silence. Simple, cheap, and easily fooled by background noise or a thoughtful pause.
- Silence timers wait a fixed interval after speech stops. Predictable, but either sluggish or trigger-happy.
- ML-based semantic endpointing predicts from prosody and partial transcript whether the utterance is complete. Commercial semantic turn-detection models arrived around 2024, including with OpenAI’s Realtime API.
Poor endpointing produces two failure modes. Too eager, and the agent interrupts someone mid-sentence. Too patient, and every reply feels sluggish. A practical tip from teams shipping these systems: tune endpointing per use case, not globally. A customer support bot can afford a longer silence window than a fast-paced game companion. And always keep a manual “push to talk” fallback for noisy environments.
Barge-In and Full-Duplex Conversation
Good voice agents let users interrupt mid-response. That sounds like a UX nicety; architecturally it is a systems problem. Supporting barge-in requires echo cancellation so the agent does not hear its own voice, concurrent listening and speaking, and the ability to cancel in-flight speech synthesis the moment the user starts talking.
This is where transport choice matters. Low-latency audio typically rides on WebRTC, the browser standard that handles jitter buffering, packet loss concealment, and echo cancellation in the client. The W3C WebRTC Recommendation from 2021 defines the browser APIs, while the IETF’s RTCWEB work produced the underlying protocols. Building barge-in without echo cancellation is a recipe for an agent that talks over itself, so treat AEC as a first-class requirement rather than a nice-to-have.
Transport and Infrastructure Choices
Below the models sits plumbing that determines whether any of the latency work pays off. Three layers matter:
- Client audio stack. WebRTC in browsers, native audio APIs on mobile, SIP or media servers for phone lines.
- Streaming channel. WebSocket or gRPC between client and backend services.
- Service topology. Where ASR, LLM, and TTS run, and how close they sit to users.
The last point is underrated. A pipeline with a 200-millisecond model but a 300-millisecond cross-continent round trip will feel worse than a slightly slower model deployed nearby. Teams building this layer often lean on patterns from cloud infrastructure and architecture to place inference close to the edge without duplicating every service.
Cost deserves an honest look too. End-to-end audio models are typically more compute-intensive per second of audio than cascaded text pipelines, which changes unit economics at scale. A pipeline that costs pennies per conversation in a cascade can multiply when every second of silence is billed against an audio-native model.
Evaluation: An Immature but Improving Discipline
Measuring voice-agent quality is harder than measuring chatbot quality. The metrics that matter include time-to-first-audio, end-to-end latency, word error rate, and interruption-handling success. As of recent knowledge, there is no widely adopted standard benchmark for full-duplex voice-agent quality, so claims of “human-level” latency deserve skepticism.
A practical evaluation approach that works in practice:
- Record real conversations, including interruptions and background noise.
- Replay them against each build and measure time-to-first-audio at the 50th and 95th percentiles.
- Score interruption handling separately from answer quality.
- Test endpointing on accented speech, slow speakers, and noisy rooms.
That last item catches more regressions than any model benchmark. A system that handles clean studio audio beautifully can fall apart on a phone call from a busy street.
Design Patterns That Actually Work
A few patterns recur across teams that ship voice agents successfully. None are exotic; they are discipline.
Stream everything, everywhere. If one component in the chain waits for a full input, the whole system inherits its latency. For a broader treatment of how inference systems are laid out, an AI inference architecture guide covers the plumbing in more depth.
Optimize the first chunk, not the last. Time-to-first-audio is the metric users feel. Cache common openings, pre-warm models, and stream synthesis sentence by sentence.
Separate turn detection from transcription. They are different problems with different failure modes. Bundling them makes both harder to tune.
Plan for interruption from day one. Retrofitting barge-in onto a system built for strict turn-taking is painful. Build the cancellation path early.
Instrument everything. Log timestamps at every hop. Without per-stage traces, latency regressions become guesswork.
For teams designing the wider stack around these patterns, resources on enterprise AI systems and architecture and on how AI cloud architecture is evolving provide useful context for where voice fits in a larger platform.
Common Mistakes and How to Avoid Them
The same errors recur in real deployments. A common one is choosing a strong language model while leaving batch-mode speech recognition in place. Another is tuning endpointing in a quiet office and then deploying to callers in cars. Another frequent miss: forgetting that echo cancellation must run on the client as well as the server, or the agent will hear itself through the user’s speakers.
Perhaps the most expensive mistake is treating voice as text with a microphone bolted on. Voice has different turn structure, different repair behavior when something is misheard, and different expectations about pacing. Architectures that respect those differences feel natural; those that ignore them feel like a phone tree with a personality.
Conclusion
Real-time voice AI architecture is a latency discipline more than a model choice. The winning pattern is streaming at every stage, semantic turn detection tuned per use case, WebRTC-class transport with echo cancellation, and evaluation that measures time-to-first-audio rather than total response time. Cascaded pipelines remain the controllable workhorse; end-to-end speech-to-speech models offer naturalness at the cost of debuggability and compute. Most teams end up with a hybrid. The agents that feel human are not the ones with the biggest models; they are the ones where every millisecond between your last word and their first was deliberately spent.
FAQ
How fast does a voice AI need to respond to feel natural?
Human turn gaps average roughly 200 milliseconds, which is effectively unattainable end to end today. Vendors commonly target under one second as a design goal. In practice, starting to speak within 500 to 800 milliseconds feels responsive to most users, especially if the first words arrive quickly and the rest streams in.
What is the difference between a cascaded pipeline and an end-to-end voice model?
A cascaded pipeline chains separate speech recognition, language model, and speech synthesis stages, plus turn detection. It is easier to debug, swap vendors, and enforce text-based rules, but adds latency at each hop. An end-to-end model takes audio in and emits audio directly, sounding more natural but offering fewer control points and higher compute cost.
Why is turn detection so difficult?
Deciding when someone has finished speaking depends on prosody, context, and culture—not on silence alone. A fixed timer either cuts people off during natural pauses or makes every reply feel slow. Modern systems use semantic models that predict completion from partial transcripts and audio cues, but tuning still varies by use case and environment.
What does barge-in require architecturally?
Barge-in means letting users interrupt the agent mid-sentence. It requires echo cancellation so the agent does not hear its own output, concurrent listening and speaking, and the ability to cancel in-flight speech synthesis instantly. Without client-side echo cancellation, the agent will often interrupt itself.
Is WebRTC necessary for real-time voice AI?
Not strictly, but it solves hard problems for free. WebRTC handles jitter buffering, packet loss concealment, and echo cancellation in the browser, which are exactly the issues that break real-time audio. Many systems use WebRTC for client transport and WebSocket or gRPC between backend services.
How should teams evaluate a voice agent’s quality?
Measure time-to-first-audio at the 50th and 95th percentiles, end-to-end latency, word error rate, and interruption-handling success. Replay recorded conversations with background noise and accented speech, and score interruption handling separately from answer quality. No widely adopted full-duplex benchmark exists yet, so internal test sets matter more than vendor claims.







