When building conversational Voice AI, developers obsess over TTFT (Time to First Token) of LLMs. But when real users speak to real agents, the most jarring failure mode isn't a 500ms response delay—it is conversational collision.
Humans interrupt each other within 150ms to 200ms of vocal intent. If an agent takes 800ms+ to acknowledge that you spoke and stop its own audio playback, the illusion of intelligence collapses instantly. The agent feels deaf, stubborn, and robotic.
Over the past months, I engineered and open-sourced HardCall, an industrial voice cockpit that drives interruption (barge-in) latency down to 52 milliseconds.
Here is an architectural autopsy of why standard voice pipelines lag, and how we engineered a sub-60ms interruption loop from scratch.
1. Why Standard Voice Agent Pipelines Lag
Most voice agent stacks follow a naive serial pipeline:
- Microphone audio is buffered into 500ms chunks on the browser.
- Chunks are transmitted over WebSocket.
- Server runs Cloud STT (Whisper / Deepgram) or high-level VAD.
- If speech is detected, an abort signal travels back through WebSocket.
- Client clears the Web Audio API buffer.
The Math of Latency:
- Audio Frame Buffering: 250ms – 500ms
- WebSocket Serialization & TCP Congestion: 40ms – 120ms
- Cloud VAD Inference Round-Trip: 150ms – 300ms
- Client Playback Buffer Drain: 100ms – 250ms
- Total Barge-In Latency: 540ms – 1,170ms (far above human threshold!)
2. The HardCall Architecture: 52ms SLA
To break through the 200ms barrier, HardCall re-engineers every layer of the voice stack:
[User Mic] │ (Raw PCM @ 16kHz) ▼ [FreeSWITCH RTP Edge] ──(20ms RTP Packets)──► [SenseVoice Small Acoustic Engine] │ │ (Speech Probability > 0.82) │ ▼ └──────(Instant Hardware RTP Mute < 15ms)◄──────────┘ │ ▼ (WebRTC MediaStream) [Browser Audio Output Cancelled] Key Architectural Invariants:
A. Raw RTP over UDP Instead of WebSockets
WebSockets rely on TCP. A single dropped packet causes Head-of-Line blocking, stalling audio playback for 200ms+. HardCall streams direct RTP over UDP with jitter buffers capped at 20ms.
B. SenseVoice On-Premise Small Acoustic Model
Instead of relying on cloud speech-to-text APIs to tell us if someone spoke, HardCall deploys a quantized SenseVoice small acoustic model directly co-located on the RTP edge node. It evaluates acoustic energy and phoneme intent on 10ms frame slices:
- Detection time: 18ms
- False-positive suppression: Dynamic noise gate with hysteresis filtering.
C. Client-Side Playback Hardware Flush
Stopping audio on the server is useless if the browser has 300ms of queued audio chunks in its AudioBufferSourceNode. HardCall fires an out-of-band RTCDataChannel cancellation token that immediately calls:
// Instant audio pipeline flush if (audioSourceNode) { audioSourceNode.stop(0); audioSourceNode.disconnect(); } 3. Real-World Benchmark: Interruption Latency Comparison
| Voice Pipeline Architecture | Frame Size | VAD Engine | Total Barge-in Latency | Conversational Feel |
|---|---|---|---|---|
| Naive Cloud STT | 500ms | Cloud Whisper | ~950ms | Completely Deaf |
| WebRTC + Silero Cloud | 64ms | Cloud VAD | ~280ms | Noticeably Hesitant |
| HardCall (RTP Edge) | 20ms | Local SenseVoice | 52ms | Human-Natural |
4. Run the Cockpit Locally or in Browser
You don't need a telephony server to test this. HardCall includes a zero-config browser studio simulating real-world stress scenarios:
- Hostile HR Screen: Agent cuts you off when you dodge salary questions.
- System Design Pressure: Rapid-fire technical probing with real-time audio radar autopsies.
🔗 GitHub Repository: github.com/wangguode/hardcall
🌐 Live Browser Studio: hardcall.153557421.workers.dev
⭐ If low-latency voice engineering matters to your stack, drop a star and check out the source code!