Abstract
Current AI voice assistants primarily rely on a turn-based interaction paradigm, which fails to capture the fluid, overlapping nature of natural human conversation. This paper introduces DuplexMamba, an end-to-end speech-to-text model built on the Mamba architecture. By leveraging the linear computational complexity of Selective State Space Models (SSMs), DuplexMamba maintains stable memory usage during extended dialogues and enables true "duplex" communication—the ability to process incoming audio while simultaneously generating a response. Our results demonstrate that DuplexMamba outperforms existing duplex models like VITA and Moshi, particularly in interruption handling and long-context stability.
Introduction
The standard "turn-based" paradigm—where a user speaks, the model processes, and then the model responds—is far from natural human dialogue, which often involves interruptions, background noise, and overlapping speech. Transitioning to a "duplex" system, where communication happens in both directions simultaneously, presents two significant technical challenges.
First, the quadratic scaling of the Transformer's self-attention mechanism ($O(n^2)$) leads to prohibitive memory costs and latency as conversation history grows. Second, traditional "cascaded" systems (ASR models feeding into LLMs) suffer from error propagation and are difficult to optimize for the low-latency requirements of streaming audio. DuplexMamba addresses these hurdles by replacing the Transformer backbone with Mamba, an SSM known for linear scaling and a fixed-size contextual memory.
System Architecture
DuplexMamba is composed of three primary components designed for low-latency, streaming performance:
- ConMamba Speech Encoder: Unlike standard bidirectional encoders that require a complete audio clip to function, the ConMamba encoder utilizes bidirectional modeling within discrete 2-3 second "slices." This allows the model to capture local context effectively while maintaining a streaming workflow.
- Speech Adapter: A multi-layer perceptron (MLP) serves as the bridge, downsampling audio representations and mapping them into the embedding space of the language model.
- Mamba-based Language Model: The core of the system is a 2.8B parameter Mamba LLM. Its linear complexity ensures that GPU memory usage remains constant regardless of the conversation's duration, effectively solving the "memory wall" encountered by Transformer-based models.
Enabling Duplex Communication
The hallmark of DuplexMamba is its ability to handle simultaneous audio streams through a novel Duplex Decoding strategy. This is managed natively through the use of three specific state tokens:
<response>: Indicates the user has finished a query and the model should generate an answer.<incomplete>: Signals that the user is still speaking, prompting the model to wait for the next audio slice.<ignore>: Identifies background noise or speech not directed at the assistant.
Interruption Handling
When a user interrupts while the model is already generating a response, DuplexMamba initiates an auxiliary decoding branch. This branch processes the new incoming audio slices in parallel with the primary response branch. If the auxiliary branch detects a <response> token—indicating a new, valid query—the model "switches" its state, overwriting the previous generation to respond to the interruption immediately. This native integration of interruption logic reduces the need for complex external controllers and minimizes system latency.
Training and Evaluation
The model was developed through a rigorous four-stage training pipeline:
- ASR Training: Utilizing over 11,000 hours of audio from LibriSpeech, TED-LIUM 3, and Multilingual LibriSpeech.
- Instruction Tuning: Fine-tuning on 200,000 samples from the VoiceAssistant dataset.
- State Discrimination: Training on a custom dataset to refine the model's ability to distinguish between response-worthy queries, incomplete speech, and background noise.
- Benchmark Testing: Evaluation via VoiceBench, covering instruction following (AlpacaEval), spoken QA (SD-QA), and safety (AdvBench).
Key Results and Insights
DuplexMamba demonstrates significant improvements over current state-of-the-art duplex models:
- Superior Duplex Performance: On VoiceBench, DuplexMamba achieved an overall score of 50.26, substantially higher than VITA (37.62) and Moshi (28.43).
- Memory Efficiency: While Transformer models like Qwen2-Audio eventually face Out-of-Memory (OOM) errors during long interactions, DuplexMamba’s memory footprint remains perfectly flat, making it ideal for "always-on" applications.
- High Precision Interruption: The model achieved a 99.35% F1 score in interruption and non-awakening tests, showcasing its robustness against background noise compared to Qwen2-Audio (79.32%) and VITA (90.47%).
- Competitive ASR: Despite its focus on duplexing, the model maintains a Word Error Rate (WER) competitive with specialized models like Whisper-small.
Limitations and Future Directions
While DuplexMamba excels in architectural efficiency and conversation flow, its 2.8B parameter scale limits its performance on knowledge-intensive tasks (e.g., SD-QA) compared to larger 7B+ models. Future work will explore migrating to the Mamba-2 architecture for further speed enhancements and scaling the model with larger multimodal datasets to improve reasoning and factual accuracy.
Summary updated