DuplexMamba: Enhancing Real-time Speech Conversations with Duplex and Streaming Capabilities

Xiangyu Lu, Wang Xu, Haoyu Wang, Hongyun Zhou, Haiyan Zhao, Conghui Zhu, Tiejun Zhao, Muyun Yang

TL;DR

DuplexMamba is a novel end-to-end multimodal model that brings real-time, duplex speech-to-text capabilities to the Mamba architecture. By leveraging the linear complexity and fixed-size state of State Space Models (SSMs), it achieves simultaneous input processing and output generation with significantly better memory efficiency than traditional Transformer-based models.

What Problem Does This Paper Address?

Natural human conversation isn't just turn-taking; it’s "duplex," meaning we listen and process information even while we are speaking. Most current AI voice assistants operate in a rigid, turn-based manner. Furthermore, traditional conversational models are built on Transformer architectures, which suffer from quadratic computational complexity ($O(L^2)$). As a conversation grows longer, the memory required for the "KV cache" explodes, leading to high latency and prohibitive hardware costs.

Existing attempts to solve this often rely on "cascaded" systems (separate ASR and LLM modules) that suffer from error propagation, or "pseudo-duplex" methods like time-division multiplexing that don't truly process streams in parallel. DuplexMamba aims to provide a unified, end-to-end architecture that is both computationally efficient for long contexts and capable of handling real-time interruptions and background noise.

Methods

The authors propose a three-part architecture: a ConMamba speech encoder (which uses bidirectional Mamba blocks and a CNN frontend), a speech adapter (a two-layer MLP), and a Mamba-2.8B language model.

To achieve real-time duplex capabilities, they introduced several innovations:

  1. Four-Stage Training: The model is trained through Multimodal Alignment (ASR), Instruction Tuning (QA), Input State Discrimination (learning interaction tokens), and finally, Streaming Alignment (fine-tuning on 3-second audio slices).
  2. State Tokens: The model learns to predict three specific tokens to manage the conversation flow:
  3. <response>: The user has finished a query; start responding.
  4. <incomplete>: The user is still speaking; wait for more input.
  5. <ignore>: The input is background noise or not directed at the AI; do not respond.
  6. Auxiliary Decoding Branches: Because Mamba has a fixed-size recurrent state ($h_t$), the system can "branch" the conversation effortlessly. If a user interrupts while the AI is speaking, the system simply duplicates the current model state to a new branch to process the interruption without losing the context of the ongoing generation.
Figure 1: The model architecture of DuplexMamba.

Datasets

The model was trained on a massive corpus of audio and text data:

  • ASR Data: LibriSpeech (960h), TED-LIUM 3 (450h), and Multilingual LibriSpeech (10,000h).
  • QA Data: The VoiceAssistant dataset (200k samples) for instruction following.
  • State Discrimination Data: A custom dataset featuring response-required, truncated (incomplete), and filtered background (ignored) audio segments.
  • Evaluation: The model was tested on VoiceBench, a comprehensive benchmark for voice assistants covering tasks like open-ended QA (AlpacaEval), safety (AdvBench), and instruction following (IFEval).

Key Insights and Ideas

  • The Mamba Advantage: The most critical "aha moment" is the realization that Mamba’s fixed-size state is a perfect fit for duplex interaction. In a Transformer, duplicating a branch to handle an interruption requires copying a massive, growing KV cache. In Mamba, you only copy a small, fixed-size vector.
  • Streaming Bidirectionality: While Mamba is inherently causal (unidirectional), the authors used a ConMamba encoder that runs two-directional SSMs. By training this on 3-second "slices," they successfully adapted a bidirectional encoder for real-time streaming without waiting for the full audio file to finish.
  • Natural Interruption Handling: By predicting the <incomplete> token, the model can "roll back" its state to wait for the rest of a sentence, allowing for a much more fluid user experience compared to simple voice activity detection (VAD).
Figure 3: The duplex decoding strategy of DuplexMamba. "IC" is short for the "<incomplete>" token, "RE" for the "<response>" token, and "IG" for the "<ignore>" token. "O1" and "O2" represent the output tokens for query 1 and query 2, respectively. Due to the fixed state size in Mamba-based models, creating an auxiliary branch simply involves duplicating the model’s current state.

Key Results

  • Superior Efficiency: As shown in Figure 4, DuplexMamba maintains a flat memory footprint regardless of context length. In contrast, the Transformer-based Qwen2-Audio sees memory usage skyrocket, hitting "Out of Memory" (OOM) at a context length of 16,384 tokens.
  • Top-Tier Performance: On VoiceBench, DuplexMamba achieved the best performance among all duplex models evaluated, outperforming VITA, Moshi, and Mini-Omni2.
  • High Precision Interaction: The model achieved an F1 score of 99.35 in distinguishing between interruptions and background noise, significantly outperforming Qwen2-Audio (79.32) and VITA (90.47).
Figure 4: GPU memory usage of DuplexMamba and Qwen2-Audio across different context lengths.

Limitations and Future Work

The authors acknowledge that the 2.8B parameter backbone is relatively small compared to the 7B or 8B models used in many state-of-the-art Transformers. This resulted in lower scores on the SD-QA task, which relies heavily on the model's internal "world knowledge."

Future work will likely involve scaling DuplexMamba to larger parameter counts and upgrading the architecture to Mamba-2 to further enhance processing speeds. Additionally, the current model is speech-to-text; extending this to a full speech-to-speech (audio-out) Mamba model is a natural next step for the field.

Summary updated

BibTeX
@inproceedings{lu2025duplexmamba,
  author = {Xiangyu Lu and Wang Xu and Haoyu Wang and Hongyun Zhou and Haiyan Zhao and Conghui Zhu and Tiejun Zhao and Muyun Yang},
  title = {{DuplexMamba: Enhancing Real-time Speech Conversations with Duplex and Streaming Capabilities}},
  booktitle = {NLPCC},
  year = {2025},
}
Figure