{"slug": "how-we-built-duo-a-full-duplex-speech-to-speech-model", "title": "How we built Duo, a full-duplex, speech-to-speech model", "summary": "A team built Duo, a full-duplex speech-to-speech model, by adapting the open-weight Qwen3.5-4B LLM to streaming audio rather than training a speech model from scratch, using a frozen copy of the same model as a teacher to preserve its language and instruction-following capabilities. Duo's backbone reads and writes six interleaved streams — four text (system instructions and tool results, user transcript, assistant words, tool calls) and two audio (user speech as streaming FastConformer encoder features, assistant speech as continuous Mimi-family latents) — all advancing together on a shared 80 ms clock, with tool calls and results able to run faster on text-only rows between audio frames. The approach targets the tradeoff in which full-duplex models learn turn-taking and interruption handling from human conversation data but lose the modularity and controllability of instruction-tuned LLMs.", "body_md": "# How we built Duo\n\nTurning an open-weight LLM into a full-duplex speech model.\n\nTraditionally, AI voice agents have combined separate models for transcription (STT), response generation (LLM), and speech synthesis (TTS) in a pipelined system. While the modular design allows each component to be replaced or upgraded independently, it comes at a cost of the end-user conversational experience. Even with streaming optimizations, each stage introduces additional latency, while the loss of acoustic information during transcription limits spoken language understanding.\n\nTo address these issues, recent fused and realtime architectures feed the input audio directly to a\n                speech-language model in order to preserve prosodic information such as hesitations, pronunciations\n                and other vocal cues. On the output side, contextual TTS models condition on dialogue history or the\n                LLM's internal representations<sup>[1](#r1)</sup> for more contextually appropriate and\n                natural-sounding speech.\n\nWhile fused and realtime architectures improve speech understanding and generation, they are still\n                fundamentally turn-based and rely on separate, lightweight *voice activity detection* (VAD) or\n                turn-detection models for controlling when to speak and when to listen. As these models have to\n                operate under realtime constraints they can't take the full conversation history into account (like\n                if the user says \"don't interrupt me unless I make a factual mistake...\") and are easily confused by\n                background speakers<sup>[2](#r2)</sup>.\n\nFull-duplex, speech-to-speech models instead follow the Bitter Lesson<sup>[3](#r3)</sup>\n                by learning turn-taking, interruption handling, and backchanneling directly from human conversation\n                data, rather than relying on explicitly programmed rules or separate detection models. This enables\n                more natural and fluid interactions, creating a more immersive conversational experience.\n\nHowever, this tighter integration comes at the cost of modularity and controllability, making it harder to leverage advances in existing language models or reliably steer the agent's behavior. Ideally, we want to combine the conversational fluidity of full-duplex speech models with the capabilities and controllability of instruction-tuned LLMs, enabling agents to answer questions, follow instructions, and use tools while continuously listening and speaking.\n\n## [#](#building-duo)Building Duo\n\nWith Duo, we aim to bridge this gap by bringing full-duplex conversational capabilities to an existing instruction-tuned language model. Rather than training a speech-to-speech model from scratch, we start with an open-weight LLM and adapt it to streaming audio on speaker-separated human conversations, using the original text model as a teacher to preserve its language and instruction-following capabilities.\n\nWe initialize the backbone from Qwen3.5-4B<sup>[4](#r4)</sup>, a hybrid architecture\n                interleaving Gated DeltaNet and attention layers, and keep a frozen copy of the\n                same model as the teacher. The backbone reads and writes six interleaved streams: four text streams\n                and two audio streams. The text streams carry system instructions and tool results, the user's\n                transcript, the assistant's words, and tool calls. The audio streams carry the user's speech, as features\n                from a streaming FastConformer encoder<sup>[5](#r5)</sup>, and the assistant's speech, as\n                continuous Mimi-family latents<sup>[6](#r6),[7](#r7)</sup>. Building on\n                earlier full-duplex work<sup>[6](#r6),[8](#r8),[9](#r9)</sup>,\n                all six streams advance together on a shared 80 ms clock, while tool calls and tool results\n                can run faster on text-only rows between audio frames.\n\nAssistant audio is generated one frame at a time by a flow-map\n                head<sup>[10](#r10),[11](#r11)</sup>, a small MLP conditioned on the\n                backbone's output at the assistant audio cell. As in continuous audio language\n                models<sup>[12](#r12)</sup> and Pocket TTS<sup>[7](#r7)</sup>, each frame is\n                a continuous 32-dimensional latent rather than a stack of discrete codebooks, so there is no depth\n                transformer over codebooks. The head is initialized from Pocket TTS and trained with Lagrangian\n                self-distillation<sup>[10](#r10)</sup>, which learns the flow map directly, so a frame\n                is sampled in a single forward pass. A short audio voice prompt at the start of the conversation sets\n                the assistant's voice.\n\n### [#](#delayed-streams-modeling)Delayed streams modeling\n\nDelayed-streams modeling (DSM)<sup>[6](#r6),[13](#r13),[14](#r14)</sup>\n                models time-aligned streams with a decoder-only language model for streaming\n                sequence-to-sequence tasks. Alignment is computed beforehand, and a delay is introduced between input\n                and output streams, so the model can generate the output as the input arrives. With text and audio streams,\n                delaying the text gives speech recognition; delaying the audio gives speech synthesis. Text is\n                sparser than audio, so the text stream is padded to the audio frame rate: frames between words hold\n                a padding token `<p>`, and a word-start token `<w>` marks the\n                frame before each word. Both are added to the vocabulary and predicted with the same softmax as\n                ordinary text.\n\nFactorized DSM (F-DSM)<sup>[15](#r15)</sup> shows that `<w>` can be\n                removed, and separates the decision to wait from the choice of token: a binary head predicts whether\n                the stream emits, and only then is the token drawn from the original vocabulary, which better preserves the language model's text-only\n                perplexity. We use the same\n                factorization for every text stream the model writes. The output head stays frozen with its vocabulary unchanged, and the large-vocabulary softmax is\n                skipped on frames that wait.\n\nFor a stream on frame *t*, with emit decision *e*<sub>*t*</sub> and token\n                *x*<sub>*t*</sub>:\n\nwhere *a*<sub>*t*</sub> is the hidden state after the frame's audio,\n                *h*<sub>*t*</sub> the hidden state the token is predicted from, and *W* the frozen\n                output head. A silent frame (*e*<sub>*t*</sub> = 0) has no token.\n\nEach stream is trained on its log-likelihood:\n\nThe emit term is trained on every frame, silent ones included; the token term only on frames that emit.\n\nIn a conversation, Duo does both tasks at once. The user's transcript is delayed behind the user's audio, as in speech recognition, and the assistant's audio is delayed behind the assistant's text, as in speech synthesis. Both text streams use the factorized emit decision above.\n\n### [#](#time-aligned-parallel-streams)Time-aligned parallel streams\n\nThe model runs on a 12.5 Hz clock, the frame rate of both the FastConformer encoder and the Mimi codec. Every stream is aligned to it: each 80 ms frame holds one frame of user audio, one frame of assistant audio and at most one token per text stream.\n\nAt one token per 80 ms frame, a 60-token tool call would take almost five seconds to write. Tool calls and tool results are therefore not tied to the audio clock. Between live frames, the model can write tool-call tokens on text-only rows, and a tool result is prefilled in one pass as a burst of system tokens. In training, the rate at which each tool call is written is drawn uniformly between 12.5 and 200 tool-call tokens per second, up to 16 per frame, so the model learns to write calls at different speeds. At inference, a call is written as fast as the hardware can decode.\n\nRUBATO<sup>[16](#r16)</sup>, developed independently, gives real-time and thinking\n                streams separate clocks so a model can reason faster than it speaks. In Duo, only the attention window and cache eviction follow\n                the audio clock. RoPE positions still count rows, so audio positions jump across the text-only rows of\n                a tool call. Separate RoPE clocks for audio and text, as in RUBATO, are something we are considering\n                adopting.\n\n### [#](#packing-streams-into-one-sequence)Packing streams into one sequence\n\nLaid out as a grid, most cells are empty: a text stream writes a token on a minority of frames, and the system stream can be quiet for minutes. We drop the empty cells and pack the rest into one causal sequence. Every frame keeps its two audio cells, and a text stream takes a position only when it writes a token. On our training mix this more than halves the sequence length. Packing does not change RoPE positions: every position in a row shares the row's index, so positional distance still measures time in rows rather than packed length. When a stream was silent on the previous frame, it has no token position to predict from on the current row, so a learned query token takes its place to provide a hidden state for the next prediction.\n\nIn the Gated DeltaNet layers<sup>[17](#r17)</sup>, each stream runs its own recurrence\n                over its own positions, with the layer's weights shared. A query is a read-only step in its\n                stream's recurrence: it neither decays nor writes to the state (α = 1,\n                β = 0).\n\nAt inference, each frame appends one row: the previous frame's tokens, any queries, and the new user and assistant audio. The row goes through the backbone in a single pass. The emit heads are sampled first, the language model's head runs only for streams that emit, and the queries are dropped before the cache.\n\n### [#](#sliding-audio-window-attention)Sliding audio window attention\n\nMost of the KV cache in a long conversation is audio keys. Old audio is rarely needed verbatim, since what was said survives in the transcript, so to save KV cache memory at inference, attention over audio is limited to a sliding window over the last two to three minutes. Text keys stay visible for the whole conversation: the transcripts of both speakers, tool calls and tool results. The voice prompt that sets the assistant's voice is pinned and never expires.\n\nIn training, the window is part of the attention mask: a position attends to every text key, and to an audio key only if it falls inside the window. At inference, audio keys are kept in a circular buffer that holds the last window of frames, with each new frame overwriting the oldest. Text keys and the pinned voice prompt are kept in a separate persistent region. Each position attends to the two regions separately, and the two partial results are combined using their log-sum-exp normalizers. This gives exactly the attention over both regions, while audio memory stays fixed however long the conversation runs.\n\nWindow distance is measured on an audio clock that advances only on frames with live audio, so the\n                text-only rows of a tool call (see [Time-aligned parallel streams](#time-aligned-parallel-streams)) do not use up the window.\n\n### [#](#text-teacher-distillation)Text-teacher distillation\n\nWe distill the assistant stream from the frozen base model. To build the teacher's input, we\n                *turnify* the conversation's timeline into chat turns. Utterances are ordered by their\n                midpoint, so speech cut off by an interruption comes before the interruption. Backchannels inside\n                the other speaker's turn are dropped. A tool call, its spoken preamble and its result become one\n                block.\n\nWe first map each assistant token to its position in the teacher's chat. Where student and teacher\n                tokens match, we use a forward-KL loss<sup>[18](#r18)</sup> over the full vocabulary. Backchannels are\n                not in the teacher's input, so the assistant's backchannels are trained with plain cross-entropy on the\n                recorded tokens.\n\n### [#](#rl-and-on-policy-training)RL and on-policy training\n\nTeacher forcing is off-policy: the model trains on recorded conversations, never on its own\n                rollouts. On-policy distillation<sup>[19](#r19),[20](#r20)</sup> instead has\n                the teacher score the model's own rollouts.\n\nEach rollout actor streams a recorded user turn into the model and lets the conversation run free, with tool calls answered by an LLM acting as a stateful tool simulator. The resulting trajectory is turnified and scored by the teacher. It contains the model's own speech, its own transcript of the user and its tool calls. The loss is the same forward KL as in teacher-forced distillation, now over the model's own rollouts:\n\nwhere τ is a rollout from the actors' recent policies, *S*(τ) the frames on which the assistant\n                or tool-call stream emits, and *c*<sub>*t*</sub> the teacher's turnified context at frame\n                *t*. Following PipelineRL<sup>[21](#r21)</sup>, updated weights stream back to the\n                actors and are committed between decode steps without pausing generation, so a conversation can\n                span several policies.\n\nThe same loop runs reinforcement learning on the user transcript, following X2Streaming-ASR<sup>[22](#r22)</sup>, which likewise splits streaming recognition into when to emit and\n                what to emit. Each prompt is rolled out *G* times, and rollout *i* gets a reward\n                *R*<sub>*i*</sub> that penalizes word errors and the delay before each correct word\n                appears. Its advantage uses a leave-one-out baseline over the group<sup>[23](#r23),[24](#r24)</sup>:\n\nUpdates maximize a clipped surrogate objective<sup>[25](#r25)</sup> over the emit\n                decisions and tokens of the user transcript:\n\nwhere ρ<sub>*t*</sub> is the probability ratio of frame *t*'s emit decision and\n                token under the updated policy and the policy π<sub>β</sub> that sampled that frame, and ε is\n                the clip range.\n\nFor turn-taking timing, deciding whether overlapping user speech is an interruption to yield to or a\n                backchannel to speak through, we use Window Likelihood<sup>[26](#r26)</sup>.\n                Rather than estimating the stop-or-continue reward by sampling rollouts as in GRPO, it integrates\n                directly over the policy's stop probabilities within a short decision window, computing and maximizing\n                the exact log-likelihood of the desired outcome.\n\nWe are preparing an open-weight preview of Duo and its benchmarks. In the meantime,\n                you can [watch Duo in action](../../), or sign up below to hear when it's out.\n\nGet an email when the preview model and benchmarks are out.\n\n**Check your inbox.** Confirm your email to join the list.", "url": "https://wpnews.pro/news/how-we-built-duo-a-full-duplex-speech-to-speech-model", "canonical_source": "https://duplexio.ai/blog/how-we-built-duo/", "published_at": "2026-11-26 15:35:09+00:00", "updated_at": "2026-11-26 15:43:59.834564+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-agents", "ai-research", "natural-language-processing"], "entities": ["Duo", "Qwen3.5-4B", "FastConformer", "Mimi", "Gated DeltaNet"], "also_reported_by": [], "takeaway": "Adapt an existing instruction-tuned LLM (Qwen3.5-4B) to six interleaved text and audio streams on a shared 80 ms clock, keeping a frozen copy of the same model as a teacher, to add full-duplex speech while preserving instruction-following.", "recommendation": {"advice": "To add full-duplex voice to an instruction-tuned LLM, keep a frozen copy as teacher and train on six interleaved text/audio streams on a shared 80 ms clock, letting tool calls run on text-only rows between audio frames.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/how-we-built-duo-a-full-duplex-speech-to-speech-model", "markdown": "https://wpnews.pro/news/how-we-built-duo-a-full-duplex-speech-to-speech-model.md", "text": "https://wpnews.pro/news/how-we-built-duo-a-full-duplex-speech-to-speech-model.txt", "jsonld": "https://wpnews.pro/news/how-we-built-duo-a-full-duplex-speech-to-speech-model.jsonld"}}