Design a Low-Latency Voice Agent for Phone Support
Last updated: November 29, 2026
Quick Overview
Design the real-time pipeline for an AI agent that answers customer support phone calls: streaming speech recognition, turn-taking, reasoning with tool calls, and speech synthesis, with a target of under one second from the caller finishing a sentence to the agent starting to speak.
Decagon
November 29, 20260
0
0 solved
Design the real-time pipeline for an AI agent that answers customer support phone calls: streaming speech recognition, turn-taking, reasoning with tool calls, and speech synthesis, with a target of under one second from the caller finishing a sentence to the agent starting to speak.
Decagon offers voice agents alongside chat and email, and on the phone latency and turn-taking errors are immediately audible to the caller. The interviewer checks a latency budget broken down by stage, streaming everywhere, barge-in handling, and how tool calls and guardrails fit without stalling the call.
What the Interviewer Expects
- Gives an explicit end-to-end latency budget per stage
- Streams ASR, LLM tokens and TTS rather than running stages in batch
- Designs end-of-turn detection and barge-in (caller interrupts)
- Handles slow tool calls with filler speech or speculative execution
- Covers telephony integration, transfer to humans and monitoring
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How would you tune end-of-turn detection without making the agent interrupt people?
- A refund lookup takes 3 seconds. What does the caller hear?
- How would you evaluate a new TTS voice or ASR model before rollout?
- How do you keep cost per minute reasonable at a few thousand concurrent calls?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
Inbound calls via SIP or a telephony provider, 8 kHz audio, many concurrent calls per tenant. Target p50 under 800 ms and p95 under 1.2 s from end of caller speech to first agent audio. Must support i...
High-Level Design
Telephony gateway -> media server (WebSocket audio frames, per-call session) -> streaming ASR with partial hypotheses -> turn detector (VAD plus a small semantic end-of-utterance model) -> agent runti...