Mouth-to-Ear Latency & WebRTC Jitter
Voice & Conversational Audio AI Agents Testing β Day 5
Decompose end-to-end conversational latency (VAD + ASR + LLM TTFT + TTS TTFB + WebRTC), enforce <800ms p95 SLO budgets, and simulate WebRTC packet-loss and jitter-buffer degradation.
Human phone conversations tolerate under 800ms of turn-taking pause. Even when each individual stage looks fast, stacking VAD endpointing, ASR finalization, LLM Time-to-First-Token (TTFT), TTS Time-to-First-Byte (TTFB), and WebRTC transport quickly breaches conversational SLOsβespecially on lossy mobile networks.
The official reference codebase for Day 5 is hosted in the repository. Clone the repository and navigate to day-5-latency-webrtc-jitter/test_day5.py to run the working solution.
git clone https://github.com/777abhi/voice-ai-testing-roadmap.git
cd voice-ai-testing-roadmap/day-5-latency-webrtc-jitter/test_day5.pyEnforce Latency Budgets & Simulate WebRTC Jitter
Run the Day 5 mouth-to-ear latency waterfall and WebRTC degradation tests.
npm run test:day5report = evaluate_latency_slo(turns, max_p50_ms=650.0, max_p95_ms=800.0)
rtc = simulate_webrtc_transport(base_one_way_ms=35.0, jitter_ms=8.0, packet_loss_pct=0.5)
assert report.passed and rtc.healthy- Tracked all five stages of the mouth-to-ear latency waterfall per conversational turn.
- Enforced p50 and <800ms p95 SLO budgets to catch LLM TTFT or TTS TTFB tail regressions.
- Simulated WebRTC packet loss and jitter-buffer underruns to verify audio quality (MOS) degradation.
π§ Knowledge Check
Which five latency stages compose the end-to-end mouth-to-ear waterfall for a streaming voice AI agent?