Case study /06 · Prototype · in development
Realtime Voice Agent

Context
Text agents get to hide latency behind a typing indicator. Voice gets nothing: dead air after a question reads as failure within a second. Making an LLM conversational over the phone is a systems problem disguised as an AI problem.
Problem
Three streams must overlap instead of queueing: transcription while the caller speaks, generation while the sentence completes, synthesis while later sentences are still being generated. Add interruptions — humans barge in constantly — and the pipeline must also cancel gracefully at any point.
Constraints
- First audio in reply had to land within conversational rhythm — a hard budget, allocated per stage.
- Barge-in: caller speech immediately halts playback and generation without losing conversation state.
- Tool calls (lookups, bookings) had to happen mid-call without freezing the conversation.
- Telephony audio is hostile: compression, noise and crosstalk were the baseline, not the edge case.
Responsibilities
- Streaming pipeline architecture across STT, LLM and TTS stages.
- Turn-taking and voice-activity detection tuned for real phone audio.
- Barge-in cancellation semantics across all three stages.
- Mid-call tool integration with conversational cover (acknowledgments while systems respond).
- Per-stage latency instrumentation and budget enforcement.
Architecture
- Audio streams into incremental STT; stabilized partial transcripts feed the LLM before the caller finishes speaking.
- Generation streams sentence-by-sentence into TTS, so the agent starts speaking while still deciding how the answer ends.
- A turn-taking controller arbitrates who holds the floor, driven by VAD and transcript stability rather than fixed silence timers.
- Barge-in triggers cascade cancellation — playback stops, synthesis flushes, generation aborts — while the transcript records exactly where the agent was cut off.
- Tools execute asynchronously; the agent bridges wait time with natural acknowledgments instead of silence.
Key decisions
- Sentence-level pipelining over full-response synthesis: the single biggest perceived-latency win.
- Budget latency per stage and instrument each one — 'it feels slow' becomes a graph, not a vibe.
- Treat interruption as a first-class conversational move, not an error: the agent yields immediately and resumes context-aware.
- Constrain the agent to its domain hard; a voice agent that rambles off-script erodes trust faster than one that transfers to a human.
Implementation
- Partial-transcript stabilization avoids reacting to words the recognizer later rewrites.
- The cancellation path is exercised in tests as heavily as the happy path — barge-in is constant in real calls.
- Call summaries and structured outcomes (booking made, question answered, transfer) emit at hangup.
- Human transfer hands off with a spoken context summary so callers never repeat themselves.
Performance
- Overlapped streaming keeps first-audio response inside the conversational budget.
- Stage-level latency traces expose regressions the moment any model or provider changes.
- VAD tuning against real telephony noise cut false interruptions substantially.
Outcomes
- Natural back-and-forth phone conversations with mid-call system lookups.
- Interruption handling that callers stop noticing — which is the point.
- A latency instrumentation rig that makes voice quality an engineering metric.
- [PLACEHOLDER — add call volumes and latency percentiles when publishable.]
Lessons
- In voice, latency architecture is the product; the model is a component.
- Design the cancellation path first — real conversations are made of interruptions.
- Phone audio humbles every demo; test against the network, not the microphone.
Software Architecture

