Design a Low-Latency Streaming Voice Agent Call Pipeline
Last updated: November 29, 2026
Quick Overview
Design the real-time pipeline for an AI voice agent that answers customer phone calls: telephony ingress, streaming speech recognition, LLM reasoning with tool calls, streaming speech synthesis, and support for the caller interrupting mid-sentence.
Sierra
November 29, 20260
0
0 solved
Design the real-time pipeline for an AI voice agent that answers customer phone calls: telephony ingress, streaming speech recognition, LLM reasoning with tool calls, streaming speech synthesis, and support for the caller interrupting mid-sentence.
Voice is one of Sierra's core channels, and a voice agent feels broken if it pauses too long or keeps talking over the caller. The interviewer is checking end-to-end latency budgeting, streaming at every stage, barge-in handling, and graceful degradation when a model or tool is slow.
What the Interviewer Expects
- Set a concrete latency budget from end of caller speech to first agent audio
- Stream between every stage instead of batching whole utterances
- Handle barge-in by cancelling generation and audio playback quickly
- Keep per-call state on a sticky session with a recovery path
- Plan for tool calls that take seconds without dead air
- Cover transfer to a human with context preserved
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you decide the caller has finished speaking without cutting them off?
- How would you handle a tool call that takes eight seconds?
- How do you test voice quality and latency before a customer launch?
- How would you run this across regions for a customer with callers worldwide?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: answer inbound calls on customer phone numbers, converse naturally, call backend tools (order lookup, refunds), transfer to a human with a summary, record transcripts. Non-functional: firs...
High-Level Design
Telephony provider (SIP trunk) sends media to a media gateway that terminates RTP and forwards 20 ms audio frames over a WebSocket to a call session service. That service, pinned per call, fan...