Day 20 — Bonus 3 April 30, 2026

Voice & Realtime Agents — Speech-to-Speech, Full-Duplex & the Sub-Second Loop

For three years the agent stack was a text problem. The interesting commercial agents in 2026 — the ones eating airline call centres, drive-through kiosks, and tier-1 IT helpdesks — are voice agents, and they require a fundamentally different architecture: bidirectional audio streams, sub-second turn-taking, interruption handling, and a model that can listen, think, and talk at the same time. This is the loop that’s redefining where conversational AI lives.

Realtime
Speech-to-Speech
Full-Duplex
VAD
Barge-in
Audio Tokens
RTC
SIP
Curriculum
Bonus · Day 20 of 17 + 3
Core Concept

From Cascade to Speech-to-Speech — Why Voice Is a Different Stack

Until 2024, every voice product was a sandwich. Audio in → ASR (automatic speech recognition, e.g. Whisper) → transcribed text into an LLM → LLM text out → TTS (text-to-speech, e.g. ElevenLabs) → audio out. This is the “cascade” or “pipeline” architecture. It works, the components are interchangeable, and every customer-service voice bot you’ve called this decade is probably built this way. It also has three structural failures: latency stacks up (each box adds 100–500 ms), paralinguistics get thrown away (the LLM never sees that the caller is angry, hesitant, or sarcastic — the transcript is flat text), and the model can’t talk while it listens (turn-taking is enforced by silence detection rather than by understanding).

Analogy first. The cascade is like writing a letter, mailing it, getting a reply, mailing back. A real conversation is two people in a room who can interrupt, finish each other’s sentences, hum “mm-hmm” while the other talks. To get the second behaviour out of a model you have to build it differently: the model itself reads and writes audio tokens directly, both streams run in parallel, and there is no “turn” concept — just two voices that happen to be present in the same context window simultaneously. That is full-duplex speech-to-speech, and it’s the architecture Moshi, GPT-realtime, and Gemini Live are converging on.

Mechanism. There are three architectures alive in the field right now, and an engineer should be able to draw all three on a whiteboard.

The three voice architectures

A
Cascade
ASR → LLM → TTS — the pipeline
How do most production voice bots work today?
Three separate models in series, each streaming chunks. Modern stacks (Pipecat, LiveKit Agents) heavily optimise the seams: streaming Whisper variants emit partials, the LLM begins generating from the first ASR partial, the TTS streams phonemes as the LLM emits its first token. End-to-end latency lands around 800–1,500 ms in production. Wins on debuggability and model swap-ability; loses on naturalness and emotional bandwidth.
B
Half-S2S
Audio in → LLM → Audio out — one model, half-duplex
How does GPT-4o ‘voice’ or LLaMA-Omni work?
A single multimodal model takes audio tokens (from a neural codec like Mimi, SNAC, or HuBERT-derived units) and emits audio tokens. There is no transcript intermediate, so paralinguistics survive: the model hears that you sighed and can choose to sigh back. But the model still produces one turn at a time — it listens, thinks, then speaks. LLaMA-Omni reports 226 ms response latency (Fang et al., ICLR 2025).
C
Full-S2S
Two parallel streams, no turns — full-duplex
Why is Moshi different from everything before it?
The model maintains two audio streams in parallel: one is its own output, the other is the user’s input. Both are tokenised at the same frame rate (12.5 Hz for Moshi) and the model predicts the next token in both streams every step. Speaker turns disappear. The model can decide to stay silent for a beat, hum acknowledgement, or interrupt — behaviours emerging from the data, not a turn-taking heuristic. Moshi reports 160 ms theoretical / 200 ms practical latency (Défossez et al., 2024).

Anatomy of a single conversational round-trip

The number every voice engineer obsesses over is response latency: from user-stops-talking to first-audio-byte-received. Below is what the budget looks like across the three architectures, mapped onto a 1-second wall clock. The cascade has to spend latency three times; full-S2S spends it once and overlaps with input.

# Latency budgets (rough order-of-magnitude, production) cascade: user stops —> VAD(120) ASR-final(180) LLM-TTFT(280) TTS-first(150) net(80) ~830ms total · 4 hops, no overlap inside hops half-s2s: user stops —> VAD(80) audio-LM-first-token(180) net(40) ~300ms total · one hop, paralinguistics preserved full-s2s: user still talking —> model can already pre-attend & co-emit net(40) ~160-200ms perceived · turn boundary becomes optional

Two more pieces matter to claim engineer-level fluency. First, VAD & barge-in. Voice Activity Detection is the millisecond-resolution classifier that decides when a human started or stopped speaking. Modern stacks use Silero VAD or a server-side model on a 10 ms hop. When the human starts talking while the model is talking, that’s barge-in, and the right behaviour is to instantly mute the TTS, snapshot what the model already said, and resume listening. Get this wrong and your agent talks over the customer or, worse, ignores them. Second, WebRTC vs WebSocket. WebRTC is built for voice (jitter buffer, opus codec, packet loss recovery, NAT traversal); WebSocket is a TCP stream. For anything user-facing in the browser or on a phone, WebRTC is the right transport — it is what LiveKit, Daily, and the OpenAI Realtime API use under the hood. WebSocket is fine for server-to-server.

A useful test of an engineer’s grasp: ask them what happens when the user says “wait, no” 200 ms after the agent starts speaking. If they can sketch VAD → interruption event → cancel pending TTS → truncate model output → emit barge-in turn back to the LLM — they understand voice agents. If they say “the LLM handles it”, they don’t.

Numbers Worth Memorizing
~200 ms
Moshi practical end-to-end latency, full-duplex S2S (Kyutai, 2024)
~226 ms
LLaMA-Omni response latency, half-duplex S2S (ICTNLP, ICLR 2025)
< 800 ms
Gemini Live first-audio-response target, native audio mode (Google)

Anchor for sales conversations: humans perceive a conversation as “natural” below ~300 ms turn-gap. Above 700 ms, callers start saying “hello? are you there?”. Cascade architectures live in the awkward middle — the entire reason S2S models exist.


Papers to Know

Three Papers That Defined the Voice-Agent Stack

arXiv preprint Seminal 2024 (Kyutai)
Moshi: a speech-text foundation model for real-time dialogue
Alexandre Défossez, Laurent Mazaré, Manu Orsini, Amélie Royer, Patrick Pérez, Hervé Jégou, Edouard Grave, Neil Zeghidour (Kyutai) · arXiv 2410.00037
Defined the modern blueprint for full-duplex speech-to-speech: a 7B Transformer that simultaneously predicts tokens for its own audio stream and the user’s audio stream, plus an inner monologue text stream for reasoning. Introduced Mimi, a streaming neural audio codec at 12.5 Hz with semantic + acoustic tokens, replacing earlier two-step codecs like SoundStream/Encodec for dialogue. Reports 160 ms theoretical and 200 ms practical end-to-end latency.
Why it matters: First open-source proof that a single neural network can hold a real-time, full-duplex spoken conversation — the engineering dream that made voice agents the hottest 2026 frontier. Every later S2S model (LLaMA-Omni 2, Step-Audio 2, Sesame CSM) cites Moshi’s parallel-stream design.
arXiv 2410.00037
Published Recent ICLR 2025
LLaMA-Omni: Seamless Speech Interaction with Large Language Models
Qingkai Fang, Shoutao Guo, Yan Zhou, Zhengrui Ma, Shaolei Zhang, Yang Feng (ICTNLP, Chinese Academy of Sciences) · arXiv 2409.06666
Built on Llama-3.1-8B-Instruct: a speech encoder + a speech adaptor feeds audio embeddings directly to the LLM, and a streaming speech decoder emits audio tokens. No intermediate transcript step. The team curated InstructS2S-200K, a 200,000-sample speech-instruction dataset. Reports response latency as low as 226 ms; accepted at ICLR 2025.
Why it matters: Showed you can bolt audio I/O onto a strong open-weights LLM with modest compute (a few hundred GPU-hours), bypassing the need to retrain a foundation model from scratch. This is the recipe most enterprises will follow for domain-specific voice agents — take Llama or Qwen, glue on speech adapters, fine-tune on your call recordings.
arXiv 2409.06666
arXiv preprint Recent 2024 (Tsinghua · gpt-omni)
Mini-Omni: Language Models Can Hear, Talk While Thinking in Streaming
Zhifei Xie, Changqiao Wu (gpt-omni / Tsinghua) · arXiv 2408.16725
Proposed a text-audio parallel decoding scheme: at each step the model emits both an audio token and a text token, so the language model’s “reasoning” trace is preserved while audio streams out. Used a batch-parallel inference trick to keep generation real-time. Released VoiceAssistant-400K, a 400,000-sample fine-tuning corpus. The smallest fully end-to-end open-source S2S model when it shipped.
Why it matters: Established the “think in text, speak in audio” pattern that lets a small model punch above its weight in voice. The implementation lives at gpt-omni/mini-omni and is the most-forked starting point for hobbyist S2S projects in 2026.
arXiv 2408.16725

GitHub Pulse

Six Repos That Define the Stack

livekit/agents ~10K ★
Production framework for realtime voice/video agents. Plugins for OpenAI Realtime, Gemini Live, Deepgram, Cartesia, ElevenLabs, Anthropic.
The infra play. WebRTC-native, ships SIP integration, deployable to LiveKit Cloud or self-hosted. Most enterprise voice agents in 2026 are running on this stack — Pipecat is its main rival.
pipecat-ai/pipecat ~12K ★
Open-source Python framework for voice and multimodal conversational agents. Built by Daily.
The Python-first developer experience play. Pipeline-of-frames architecture is conceptually elegant; integrates with Daily WebRTC. Strong demo-to-production gradient, big ecosystem of community frame processors.
kyutai-labs/moshi ~10K ★
Reference implementation of the Moshi paper: full-duplex S2S model + Mimi codec, PyTorch and MLX.
The state-of-the-art open S2S model. Apache-2.0; weights released. If you want to actually study a full-duplex model rather than call an API, this is the codebase to read line-by-line.
openai/openai-realtime-agents ~6.8K ★
OpenAI’s reference Next.js demo for Realtime-API-powered multi-agent voice flows with handoffs.
The canonical “how do I build this with the gpt-realtime API” example. Showcases agent-handoff via tool calls, instruction packs, and the “chat supervisor” pattern.
SesameAILabs/csm ~15K ★
Conversational Speech Model from Sesame — expressive TTS plus context-aware prosody for voice agents.
Where TTS meets character. Sesame is positioning prosody and emotional consistency across a conversation as the next axis after raw latency. The demo videos went viral in 2025; this is the open companion.
huggingface/speech-to-speech ~4.7K ★
Modular S2S reference pipeline assembled from open components (Whisper / Distil-Whisper, an LLM, Parler-TTS or others).
The teaching repo. Useful when you need to swap any one box (try a Chinese TTS, swap the LLM, run on Mac M-series via MLX). Not what you ship to production, but it is what you read first.
ictnlp/LLaMA-Omni ~3.1K ★
Reference implementation of the LLaMA-Omni paper — 8B half-duplex S2S model on top of Llama-3.1.
The recipe that most enterprises will copy: take a strong open LLM, glue on a speech encoder + decoder, fine-tune on your domain data. Far easier than retraining a Moshi-style model.
gpt-omni/mini-omni ~3.5K ★
Reference for the Mini-Omni paper. End-to-end audio-in / audio-out at small scale.
Tiny enough to fine-tune on a single GPU. The hobbyist’s entry point to S2S; spawned dozens of forks that swap the backbone or add languages.

Community Pulse

What Practitioners Are Saying

Andrej Karpathy · paraphrased position
Karpathy has argued that voice is the natural input modality for the LLM era and that the next interesting interfaces will be speech-first — treating the keyboard as a fallback rather than the default.
Recurring theme across his late-2025 talks (notably the “Software 3.0” framing on Latent Space) and his coverage of ambient computing. No single quotable URL on the realtime API itself, so phrased as a position rather than a verbatim quote.
Swyx (Latent Space) · paraphrased position
Swyx has argued that “Agent Engineering” — not chat — is the unit of work for AI in 2025-26, and that the production-grade voice agent is the canonical end-form: real-time, multimodal, tool-using, and observable end-to-end.
Theme of his AI Engineer Summit 2025 keynote (“Agent Engineering”) on latent.space; voice as the dominant deployment surface is a recurring thread in his Realtime API coverage.
Harrison Chase (LangChain) · paraphrased position
Chase has argued that the more agentic an application becomes, the more the LLM dictates control flow — and that voice agents collapse the LangGraph state machine onto a model that decides, in real time, when to listen, plan, call a tool, or talk back.
Synthesis of his widely-cited definition of “agentic” and his 2025 blog series on voice as a first-class LangGraph runtime. Paraphrased — no single canonical quote URL.
Simon Willison · paraphrased position
Willison has flagged the OpenAI Realtime API and the broader voice-agent rollouts as one of the more under-appreciated unlocks of 2024-25 — not because the model is smarter, but because audio bandwidth changes which jobs an agent can plausibly do.
Recurring coverage on simonwillison.net and his joint year-in-review with Swyx on Latent Space; phrased as a position because it spans many posts rather than a single quote.

Platform Deep-Dive

How the Frontier Labs Implement Voice in 2026

The four providers Susan benchmarks against on every sales call — Claude (Anthropic), OpenClaw, Codex/GPT-5.4 (OpenAI), Gemini 3.1 (Google) — have each picked a slightly different lane. Understanding the trade-offs is the difference between repeating marketing copy and being credible in a CTO meeting.

Claude
Anthropic
Voice mode launched on iOS/Android in May 2025 with five voice presets (Buttery, Airy, Mellow, Glassy, Rounded). It runs spoken prompts through the regular Sonnet/Opus models — closer to a polished cascade than a true S2S model. Claude Code voice mode rolled out in March 2026 (initial 5% staged rollout) with offline voice packs slated for educational/enterprise. Claude’s strategic bet: ship voice as a thin layer on top of the strongest reasoning model, rather than chase the lowest-latency S2S.
OpenClaw
Susan’s daily driver
OpenClaw inherits Claude’s voice substrate and adds the SKILL.md / hub-and-spoke composition layer on top — meaning a voice prompt can fan out to skill-mounted tools (calendar, code-search, file-write) without leaving the conversational thread. The 9-CVE / 1184-malicious-skills incident from 2025 is why OpenClaw locks voice-triggered tool calls behind explicit per-skill confirmation prompts. Implication for botlearn.ai: voice + SKILL.md is the cleanest path to a course-tutor agent that listens, looks up the right textbook chapter, and reads it back — no glue code.
Codex / GPT-5.4
OpenAI
The category leader on raw S2S. The Realtime API hit GA on August 28, 2025 with the gpt-realtime speech-to-speech model: native audio in / audio out, image input, MCP tool calling, and SIP-based phone integration. Reports 30.5% on the MultiChallenge audio benchmark (up from 20.6% in the December 2024 preview). Pricing roughly $32 / $64 per million audio input/output tokens — the budget line that keeps every voice startup’s spreadsheet awake at night.
Gemini 3.1
Google
Gemini Live API targets <800 ms first-audio-response and processes streaming video at 1 FPS alongside audio — the only frontier API natively built for trimodal (text + audio + vision) realtime. Native audio mode, WebSocket-based, supports interruption / barge-in. Tightly integrated with Vertex AI for enterprise quotas and with Firebase AI Logic on the consumer side. Strategic bet: voice + vision in one stream is the right unit for the next interface.
If a customer asks “which one should we build on?”, the honest answer in 2026 is: build the orchestration layer (LiveKit or Pipecat) around a swappable provider, then pick OpenAI for raw quality, Gemini for vision-rich flows, and Claude/OpenClaw when reasoning depth + tool-use safety dominates over raw latency.

Vocabulary

Ten Terms to Use Precisely

Cascade / Pipeline · ASR→LLM→TTS · 级联管道
Three-stage architecture: speech recognition feeds an LLM whose text output drives a TTS engine.
Common misuse: calling any voice bot “a cascade”. Modern S2S models are not cascades — they have no transcript intermediate.
“Their stack is still a cascade, which is why every utterance lands at 1.2 seconds even on perfect networks.”
Speech-to-Speech (S2S) · 端到端语音模型
A single model that consumes audio tokens and emits audio tokens with no text intermediate.
“S2S” does not imply full-duplex — LLaMA-Omni is S2S but half-duplex.
“Going S2S preserved the caller’s emotional cues; we saw escalation rates drop 18%.”
Full-Duplex · 全双工
Both parties can transmit simultaneously; in voice models, the network maintains parallel input and output audio streams that the model attends to jointly.
Don’t use it for any model that emits audio while the user is silent — that’s just streaming. Full-duplex requires the model to track both streams as inputs.
“Moshi’s full-duplex design is why it can hum ‘mm-hmm’ while you’re still talking.”
VAD — Voice Activity Detection · 语音活动检测
A small classifier that decides at millisecond resolution whether a frame contains speech or non-speech. Drives turn boundaries and barge-in.
A “VAD” that runs on chunks of one second is not a real VAD — it’s a silence detector. Production VADs run on 10–30 ms hops.
“Silero VAD on 10 ms hops is the default; Whisper’s built-in VAD is too coarse for barge-in.”
Barge-in · 抢话 / 打断
The user begins speaking while the agent is mid-utterance; the system detects it, mutes TTS, snapshots the agent’s emitted audio, and returns control to the user.
“Interruption” in a chat app and “barge-in” in a voice app are different. Voice barge-in must be sub-200 ms or it feels rude.
“Their barge-in latency is 600 ms and you can hear it — the bot keeps talking over the customer.”
Neural Audio Codec · 神经音频编解码器
A model that compresses raw audio into a small set of discrete tokens (e.g. Mimi 12.5 Hz, SoundStream, Encodec) and decodes them back to waveform — the “byte-pair encoder of speech.”
Don’t conflate the codec with the language model. The codec is the tokenizer; the LM operates on its tokens.
“Moshi uses Mimi at 12.5 Hz with semantic + acoustic streams — that’s why the same model can both understand and resynthesize.”
Inner Monologue · 内部独白 / 文本副线
A parallel text stream the model emits alongside audio, capturing the “reasoning” trace. Used in Moshi and Mini-Omni to keep textual reasoning quality while the user only hears audio.
It is not a transcript of the agent’s speech — it’s the model’s thoughts. Logging it is gold for debugging; surfacing it to the user is usually wrong.
“Pull the inner monologue stream into your trace store; that’s where the ‘why did it say that’ lives.”
Turn-Taking · 轮次管理
The protocol that decides who is speaking. Cascades enforce strict turns via VAD; full-duplex models learn the joint distribution of two streams and turns become emergent.
Don’t hand-roll turn-taking on top of a full-duplex model — you’ll fight the model.
“In Moshi, ‘turns’ are an analytical artefact, not a component — the model just predicts both streams.”
SIP — Session Initiation Protocol · 电话信令协议
The 1990s standard for placing and routing telephone calls over IP. Adding SIP to a voice agent stack means the agent can answer or place actual phone calls (PSTN).
SIP is signalling. Audio rides on RTP. The Realtime API now exposes SIP integration; LiveKit ships SIP servers natively.
“Once we wired the SIP trunk in, the agent answered the 1-800 line directly — no Twilio middleman.”
WebRTC · 网页实时通信
A browser-native protocol stack for peer-to-peer audio/video, with built-in jitter buffer, packet-loss recovery, and NAT traversal. The transport every modern voice agent runs over for client-facing audio.
WebRTC is not WebSocket. WebSocket runs on TCP — bad for jittery voice. WebRTC runs on UDP/SRTP.
“Use WebRTC client-to-server for audio; use WebSocket server-to-server for events. Mixing them up is most lag bugs.”

Expert Questions

Five Questions That Signal You Get It

Q1
Why does Moshi predict tokens for both the user’s stream and its own — isn’t modelling the user gratuitous?
Forces the answer that joint prediction is what gives the model a probabilistic model of when the user will stop speaking, allowing the model to learn turn-taking and barge-in from data instead of from a heuristic.
Q2
If S2S is so much better on latency, why are most production voice bots in 2026 still cascades?
Probes the trade-off space: cost ($32/M input audio tokens vs cents on Whisper), debuggability (no transcript = harder ops), customisation (cascade swaps individual boxes; S2S is monolithic), and regulated industries that need an auditable transcript.
Q3
How do you measure voice-agent quality — what does pass^k mean for a turn-by-turn audio interaction?
Connects yesterday’s observability lens to today’s topic. Strong answer: WER doesn’t cut it; you need rubric-scored end-state evals over full sessions, with the judge listening to the audio (not the transcript), plus latency p50/p95/p99 and barge-in success rate as first-class signals.
Q4
What changes about MCP and tool use in a full-duplex voice context vs a text agent loop?
Strong answer: tool calls block speech. You need either ducking (lower TTS volume while a tool runs), filler phrases (“let me check”), or speculative tool calls fired before the user is done speaking. The Realtime API now ships MCP support partly to make this orchestration easier.
Q5
Where will the “voice + vision” convergence land — will Gemini Live’s 1 FPS video stream become the default trimodal interface, or is that still niche?
Open-ended; the right tone is “niche today, default by 2027” with reasoning about latency budgets (vision tokens are expensive) and the use cases (telehealth, field service, robotics) that pull the standard forward. Lets the candidate signal product instinct.

CGO Lens

What Voice Agents Mean for botlearn.ai

$Voice unlocks a new revenue surface for tutoring

Text tutoring caps at the user’s typing speed and patience. A voice tutor that speaks back at conversational latency turns a chat product into something that competes with a human tutor — the same shift Khan Academy’s Khanmigo has been chasing. botlearn.ai’s upsell story becomes “text tier → voice tier” with a clear price ladder, because each voice minute carries 30× the API cost of a text exchange and customers will pay for it.

Pricing arithmetic to remember in customer calls: $64 / M output audio tokens at gpt-realtime ≈ $0.06 per minute of agent speech. A 20-minute lesson costs ~$1.20 in raw model cost; package at $5/lesson and you have ~75% margin pre-amortisation.

!The S2S vs cascade decision is your platform bet

If botlearn.ai picks gpt-realtime exclusively, you inherit OpenAI’s pricing and policy curves. If you pick Pipecat or LiveKit with swappable backends, you defer the choice and gain leverage in vendor negotiations — but you take on the orchestration burden. The right move for a CGO is to push engineering toward the orchestration layer in 2026 H1, then lock in a primary provider once the price sheets stabilise.

Customer success cares about three numbers

(1) p95 turn latency — if it crosses 700 ms, NPS collapses. (2) Barge-in success rate — how often the agent stops cleanly when interrupted; should be >95%. (3) Voice-to-text fallback rate — what fraction of users abandon voice for text, your reverse churn signal. Build these three into the dashboard you show enterprise buyers; they’ll all ask within the first ten minutes.

·Competitive positioning

The legacy IVR vendors (Five9, NICE, Genesys) are racing to bolt LLMs onto cascades they already own. The pure-AI entrants (Vapi, Bland, Retell) are racing to wrap the Realtime API. botlearn.ai’s wedge is neither — it is education-domain voice, where the right agent has to track curriculum state, learner mastery, and pedagogical strategy across multi-session voice histories. That’s a memory + voice + RAG problem (Days 2, 4, 20), not a generic call-centre problem. Sell against the IVRs on quality and against the wrappers on durability.

Sales objection handler

“Why not just use GPT-realtime directly?” — Because the value sits in the curriculum graph, the spaced-repetition scheduler, the voice persona that adapts to learner age, and the parental safety layer. The model is a commodity input; the product is everything wrapped around it. Same answer Notion gives when prospects ask why not just use a raw LLM.


Curriculum Tracker

Where We Are — Day 20 of 17 + 3 Bonus

D01Full Agent Stack
D02Memory Architecture
D03Planning & Tool Use
D04RAG Deep Dive
D05Agent Frameworks
D06Benchmarks & Eval
D07Multi-Agent Systems
D08Computer Use Agents
D09Code Agents
D10Long-Horizon Tasks
D11Agent Safety
D12Agent Economics
D13Research Frontiers
D14OpenClaw Deep-Dive
D15A2A Protocols
D16Agentic Commerce
D17Synthesis
D18Reasoning & Test-Time Compute
D19Agent Observability
D20Voice & Realtime Agents · today

Three weeks in. The curriculum has now covered the full agent surface a CGO needs to hold a peer-level conversation with a frontier-lab engineer: cognition (planning, reasoning, memory), I/O (tools, computer-use, voice), operations (eval, observability, economics), and ecosystem (frameworks, A2A, OpenClaw, commerce). Day 21 is open: candidate topics include verifier models & process reward, agent fine-tuning & distillation, embodied/robotic agents, or a final capstone — pick based on which conversation feels like it would land best with an inbound investor or partner this week.