Multimodal Models·Question 16 of 67Intermediate

Design a production voice agent. Pipeline vs speech-to-speech, the latency budget, and interruption handling.

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Two architectures. The pipeline: streaming ASR → LLM → streaming TTS. The native speech-to-speech model: one model consumes and emits audio tokens directly (OpenAI's Realtime API models and Gemini's Live API native-audio models are the hosted examples; Moshi is the best-known open one).

Full worked answer with diagram

Two architectures. The pipeline: streaming ASR → LLM → streaming TTS. The native speech-to-speech model: one model consumes and emits audio tokens directly (OpenAI's Realtime API models and Gemini's Live API native-audio models are the hosted examples; Moshi is the best-known open one).

Latency is the defining constraint. Human turn-taking gaps average ~200ms; anything over ~1 second voice-to-voice feels laggy, so the bar is sub-second, target ~500-800ms. A pipeline's budget decomposes roughly as: VAD/endpointing 100-300ms (you must wait to decide the user finished - the irreducible tax), streaming-ASR finalisation ~100-200ms, LLM time-to-first-token 200-500ms, TTS time-to-first-audio 100-300ms, plus network. Naively summed you blow the budget, so everything overlaps: ASR streams partials while the user speaks, the LLM starts on the endpoint (or speculatively before it), TTS begins on the first sentence rather than the full reply, and audio plays while later sentences generate. A small/fast model for the conversational layer with tool calls to heavier systems is a common split. Speech-to-speech models collapse the stack - ~300ms-class average response is achievable - and they hear prosody (sarcasm, hesitation, emotion) and generate expressive audio without a lossy text bottleneck. Their cost: the text midpoint disappears, so guardrails, logging, evals, and precise output control get harder, and tool integration runs through event protocols rather than plain text.

Interruptions (barge-in) are mandatory, not a nicety: run echo cancellation so the mic doesn't hear the agent's own output; run VAD continuously during playback; on detected user speech, stop TTS within ~100-200ms, cancel in-flight LLM generation, and - critically - truncate conversation state to what the user actually heard, not what you generated, or the agent will reference things it never said aloud. Also handle backchannels ("mm-hmm" shouldn't trigger a full stop) - a small classifier on the interrupting audio helps.

Worth sketching. Writing the per-stage millisecond budget on the arrows is what turns "latency matters" into a design argument the interviewer can check.

flowchart LR
    A["User audio"] --> B["VAD endpointing<br/>100-300 ms"]
    B --> C["Streaming ASR finalise<br/>100-200 ms"]
    C --> D["LLM time to first token<br/>200-500 ms"]
    D --> E["TTS time to first audio<br/>100-300 ms"]
    E --> F["Playback"]
    A -->|"native speech-to-speech<br/>collapses the middle"| G["Audio in, audio out<br/>~300 ms class"]
    G --> F

What a good answer covers

  • The pipeline: streaming ASR → LLM → streaming TTS
  • The native speech-to-speech model
  • Latency is the defining constraint
  • Human turn-taking gaps average ~200ms; anything over ~1 second voice-to-voice feels laggy, so the bar is…
  • A pipeline's budget decomposes roughly as

Key terms: pipeline · native speech-to-speech model · Latency is the defining constraint · sub-second, target ~500-800ms · Interruptions (barge-in)

Interviewer follow-ups to expect

  1. Where do you put safety filtering in a speech-to-speech architecture with no text midpoint?

  2. How do you evaluate a voice agent end-to-end?

  3. The user interrupts mid-tool-call - what state do you roll back?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep