00. Voice & Realtime AI — The Five-Year-Old Version¶
Modules 24-33 taught production. This module adds the hardest constraint: time.
Think of the United Nations interpreter booth. One speaker is talking in Spanish. The interpreter must hear, understand, and answer in English quickly. If the interpreter waits too long, everybody gets uncomfortable. Nobody says, good job, you were accurate after five seconds. They think the line is broken. Voice AI inherits that same social rule immediately. The user speaks. The system listens. The system thinks. The system speaks back. All of that must happen before the awkward pause becomes visible.
See. In chat, users forgive delay more easily. They can watch text appear. They can scroll. They can multitask. In voice, silence feels personal. Silence sounds like confusion. Silence sounds fake.
So the first thing to understand is simple. Voice AI is not only about correctness. It is about timing that feels socially natural. The ear hears the words and turns sound into text. The brain decides what the answer should be. The voice turns that answer back into speech. The relay race moves partial work before the full turn ends. Without that relay race, every stage waits politely. Polite systems feel slow. Slow voice systems feel broken.
If the assistant answers in one second, most people stay relaxed. If the assistant answers in five seconds, many people repeat themselves. If the assistant answers in eight seconds, some people hang up. That is why voice AI inherits social timing rules immediately. There is no warm-up period. The first turn teaches the user whether to trust the system. Simple, no?
The timing picture¶
Here is the friendly math.
ear 300ms + brain 350ms + voice 250ms + network 150ms = 1050ms
That is about one second. One second is often acceptable. Five seconds feels like a lost call.
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ the ear │─→│ the brain│─→│ the voice│─→│ network │
│ 300 ms │ │ 350 ms │ │ 250 ms │ │ 150 ms │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
│
▼
1050 ms total
See the picture before the math. Each box looks harmless alone. Together they create the awkward pause. So what to do? Name the boxes. Measure the boxes. Then overlap work wherever possible. That is the whole module in one breath.
The placeholders you will see again¶
| Placeholder | Meaning |
|---|---|
| the ear | ASR or speech-to-text that hears audio and outputs words |
| the brain | LLM processing that decides what to say next |
| the voice | TTS or speech synthesis that speaks the answer aloud |
| the relay race | Streaming pipeline that starts the next stage before the previous one fully ends |
| the awkward pause | Latency budget or visible delay that makes the assistant feel fake |
These names are childish on purpose. They make the system easier to picture. We will call them back repeatedly. Yes?
Top resources¶
- OpenAI Realtime API docs — good starting point for live multimodal sessions.
- Deepgram docs — practical streaming ASR guidance and latency notes.
- ElevenLabs docs — useful for streaming TTS and voice controls.
- MDN WebRTC guide — browser-native realtime media basics.
- MDN WebSocket guide — simple transport mental model for chunked events.
- Silero VAD repo — strong open source voice activity detection reference.
Do not memorize every page now. Just know where the map lives.
What is coming¶
- 01-five-second-failure.md — The naive serial pipeline kills conversational flow
- 02-audio-processing-basics.md — Sample rate, chunks, and signal foundations
- 03-streaming-asr.md — The ear: VAD, endpointing, and partial transcripts
- 04-text-to-speech.md — The voice: streaming synthesis and first-audio latency
- 05-streaming-pipeline.md — The relay race: WebSockets and chunked processing
- 06-latency-budgeting.md — Assigning milliseconds to named stages
- 07-interruption-barge-in.md — Turn-taking and the state machine
- 08-end-to-end-voice-models.md — Native speech-to-speech vs cascaded pipeline
- 09-telephony-constraints.md — Phone lines, 8kHz, and harsh reality
- 10-evaluation-debugging.md — Measuring and debugging voice systems
- 11-honest-admission.md — What voice AI still cannot reliably do
So first we will feel the pain clearly. Only then will the fixes matter. The ear, the brain, and the voice sound simple now. Later, each one will show sharp edges. The relay race is how they stay natural together. The awkward pause is the enemy hiding behind every stage. Look. That is the full map.
Bridge. Before learning optimizations, feel why the naive design fails emotionally. → 01-five-second-failure.md