# How we built Duo, a full-duplex, speech-to-speech model

> Source: <https://duplexio.ai/blog/how-we-built-duo/>
> Published: 2026-11-26 15:35:09+00:00

**Recommendation:** 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.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

# How we built Duo

Turning an open-weight LLM into a full-duplex speech model.

Traditionally, 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.

To address these issues, recent fused and realtime architectures feed the input audio directly to a
                speech-language model in order to preserve prosodic information such as hesitations, pronunciations
                and other vocal cues. On the output side, contextual TTS models condition on dialogue history or the
                LLM's internal representations<sup>[1](#r1)</sup> for more contextually appropriate and
                natural-sounding speech.

While fused and realtime architectures improve speech understanding and generation, they are still
                fundamentally turn-based and rely on separate, lightweight *voice activity detection* (VAD) or
                turn-detection models for controlling when to speak and when to listen. As these models have to
                operate under realtime constraints they can't take the full conversation history into account (like
                if the user says "don't interrupt me unless I make a factual mistake...") and are easily confused by
                background speakers<sup>[2](#r2)</sup>.

Full-duplex, speech-to-speech models instead follow the Bitter Lesson<sup>[3](#r3)</sup>
                by learning turn-taking, interruption handling, and backchanneling directly from human conversation
                data, rather than relying on explicitly programmed rules or separate detection models. This enables
                more natural and fluid interactions, creating a more immersive conversational experience.

However, 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.

## [#](#building-duo)Building Duo

With 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.

We initialize the backbone from Qwen3.5-4B<sup>[4](#r4)</sup>, a hybrid architecture
                interleaving Gated DeltaNet and attention layers, and keep a frozen copy of the
                same model as the teacher. The backbone reads and writes six interleaved streams: four text streams
                and two audio streams. The text streams carry system instructions and tool results, the user's
                transcript, the assistant's words, and tool calls. The audio streams carry the user's speech, as features
                from a streaming FastConformer encoder<sup>[5](#r5)</sup>, and the assistant's speech, as
                continuous Mimi-family latents<sup>[6](#r6),[7](#r7)</sup>. Building on
                earlier full-duplex work<sup>[6](#r6),[8](#r8),[9](#r9)</sup>,
                all six streams advance together on a shared 80 ms clock, while tool calls and tool results
                can run faster on text-only rows between audio frames.

Assistant audio is generated one frame at a time by a flow-map
                head<sup>[10](#r10),[11](#r11)</sup>, a small MLP conditioned on the
                backbone's output at the assistant audio cell. As in continuous audio language
                models<sup>[12](#r12)</sup> and Pocket TTS<sup>[7](#r7)</sup>, each frame is
                a continuous 32-dimensional latent rather than a stack of discrete codebooks, so there is no depth
                transformer over codebooks. The head is initialized from Pocket TTS and trained with Lagrangian
                self-distillation<sup>[10](#r10)</sup>, which learns the flow map directly, so a frame
                is sampled in a single forward pass. A short audio voice prompt at the start of the conversation sets
                the assistant's voice.

### [#](#delayed-streams-modeling)Delayed streams modeling

Delayed-streams modeling (DSM)<sup>[6](#r6),[13](#r13),[14](#r14)</sup>
                models time-aligned streams with a decoder-only language model for streaming
                sequence-to-sequence tasks. Alignment is computed beforehand, and a delay is introduced between input
                and output streams, so the model can generate the output as the input arrives. With text and audio streams,
                delaying the text gives speech recognition; delaying the audio gives speech synthesis. Text is
                sparser than audio, so the text stream is padded to the audio frame rate: frames between words hold
                a padding token `<p>`, and a word-start token `<w>` marks the
                frame before each word. Both are added to the vocabulary and predicted with the same softmax as
                ordinary text.

Factorized DSM (F-DSM)<sup>[15](#r15)</sup> shows that `<w>` can be
                removed, and separates the decision to wait from the choice of token: a binary head predicts whether
                the stream emits, and only then is the token drawn from the original vocabulary, which better preserves the language model's text-only
                perplexity. We use the same
                factorization for every text stream the model writes. The output head stays frozen with its vocabulary unchanged, and the large-vocabulary softmax is
                skipped on frames that wait.

For a stream on frame *t*, with emit decision *e*<sub>*t*</sub> and token
                *x*<sub>*t*</sub>:

where *a*<sub>*t*</sub> is the hidden state after the frame's audio,
                *h*<sub>*t*</sub> the hidden state the token is predicted from, and *W* the frozen
                output head. A silent frame (*e*<sub>*t*</sub> = 0) has no token.

Each stream is trained on its log-likelihood:

The emit term is trained on every frame, silent ones included; the token term only on frames that emit.

In 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.

### [#](#time-aligned-parallel-streams)Time-aligned parallel streams

The 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.

At 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.

RUBATO<sup>[16](#r16)</sup>, developed independently, gives real-time and thinking
                streams separate clocks so a model can reason faster than it speaks. In Duo, only the attention window and cache eviction follow
                the audio clock. RoPE positions still count rows, so audio positions jump across the text-only rows of
                a tool call. Separate RoPE clocks for audio and text, as in RUBATO, are something we are considering
                adopting.

### [#](#packing-streams-into-one-sequence)Packing streams into one sequence

Laid 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.

In the Gated DeltaNet layers<sup>[17](#r17)</sup>, each stream runs its own recurrence
                over its own positions, with the layer's weights shared. A query is a read-only step in its
                stream's recurrence: it neither decays nor writes to the state (α = 1,
                β = 0).

At 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.

### [#](#sliding-audio-window-attention)Sliding audio window attention

Most 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.

In 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.

Window distance is measured on an audio clock that advances only on frames with live audio, so the
                text-only rows of a tool call (see [Time-aligned parallel streams](#time-aligned-parallel-streams)) do not use up the window.

### [#](#text-teacher-distillation)Text-teacher distillation

We distill the assistant stream from the frozen base model. To build the teacher's input, we
                *turnify* the conversation's timeline into chat turns. Utterances are ordered by their
                midpoint, so speech cut off by an interruption comes before the interruption. Backchannels inside
                the other speaker's turn are dropped. A tool call, its spoken preamble and its result become one
                block.

We first map each assistant token to its position in the teacher's chat. Where student and teacher
                tokens match, we use a forward-KL loss<sup>[18](#r18)</sup> over the full vocabulary. Backchannels are
                not in the teacher's input, so the assistant's backchannels are trained with plain cross-entropy on the
                recorded tokens.

### [#](#rl-and-on-policy-training)RL and on-policy training

Teacher forcing is off-policy: the model trains on recorded conversations, never on its own
                rollouts. On-policy distillation<sup>[19](#r19),[20](#r20)</sup> instead has
                the teacher score the model's own rollouts.

Each 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:

where τ is a rollout from the actors' recent policies, *S*(τ) the frames on which the assistant
                or tool-call stream emits, and *c*<sub>*t*</sub> the teacher's turnified context at frame
                *t*. Following PipelineRL<sup>[21](#r21)</sup>, updated weights stream back to the
                actors and are committed between decode steps without pausing generation, so a conversation can
                span several policies.

The 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
                what to emit. Each prompt is rolled out *G* times, and rollout *i* gets a reward
                *R*<sub>*i*</sub> that penalizes word errors and the delay before each correct word
                appears. Its advantage uses a leave-one-out baseline over the group<sup>[23](#r23),[24](#r24)</sup>:

Updates maximize a clipped surrogate objective<sup>[25](#r25)</sup> over the emit
                decisions and tokens of the user transcript:

where ρ<sub>*t*</sub> is the probability ratio of frame *t*'s emit decision and
                token under the updated policy and the policy π<sub>β</sub> that sampled that frame, and ε is
                the clip range.

For turn-taking timing, deciding whether overlapping user speech is an interruption to yield to or a
                backchannel to speak through, we use Window Likelihood<sup>[26](#r26)</sup>.
                Rather than estimating the stop-or-continue reward by sampling rollouts as in GRPO, it integrates
                directly over the policy's stop probabilities within a short decision window, computing and maximizing
                the exact log-likelihood of the desired outcome.

We are preparing an open-weight preview of Duo and its benchmarks. In the meantime,
                you can [watch Duo in action](../../), or sign up below to hear when it's out.

Get an email when the preview model and benchmarks are out.

**Check your inbox.** Confirm your email to join the list.
