X-Square-Robot / X2Streaming-ASR
git clone https://github.com/X-Square-Robot/X2Streaming-ASR.git
X2Streaming-ASR is a streaming Automatic Speech Recognition (ASR) system characterized by ultra-low latency and high accuracy.
+-1
stars, 24h · #60,684
+~-7
stars, 7 days · #60,752
+81
stars, 30 days · #6,340
80
★ total · -7% this week
4
forks · 0 open issues
Star history (as recorded here)
LanguagePython
LicenseApache-2.0
Created2026-10-10 (12d ago)
Last push9d ago
Watchers2
OwnerOrganization
Links
README excerpt
X2Streaming-ASR Wait when uncertain, emit when ready: append-only streaming speech recognition Words appear tens of milliseconds after they are spoken, and are never taken back. **English** | 简体中文 Speech flows in, final text flows out: captions appear as you speak, ambiguous words wait for context, and committed text is safe for downstream agents to act on. News · Overview · Demo · Why X2 · Results · Method · Quick Start · Citation --- ## 🔥 News - **[2026-09]** The paper is on arXiv: 2609.08672. - **[2026-10]** Model weights on Hugging Face: x-square-robot/X2Streaming-ASR-4B-1009. ## ✨ Overview **X2Streaming-ASR is a low-latency, append-only streaming ASR model for Chinese, English, and code-switching speech.** On the evaluated benchmarks, it emits each character or word with a mean latency of **only 32–109 ms in Chinese and 12–85 ms in English** after the word ends, while achieving the best CER/WER on several test sets. Built on Voxtral Mini Realtime, it splits streaming recognition into *when to commit* and *what to commit*. Every 80 ms the model chooses between **LISTEN** and **DECODE**: - **Wait when uncertain.** If the latest audio is ambiguous, the model keeps listening for more context. - **Emit when ready.** Once the context is sufficient, it decodes the new audio immediately. - **Never roll back.** Output is append-only, so text is never revised after it appears. - **Native causal streaming.** Only newly arrived audio is encoded, and history is reused through the KV cache instead of being recomputed or cut off by a sliding window. This repository is **inference-only**: adaptive streaming and full-context offline inference, Transformers and vLLM backends, JSONL batch transcription, and a web demo. ## 🎬 Demo *Unmute for audio.* https://github.com/user-attachments/assets/640f5a6d-c88b-4a59-a8c9-67ef3c833464 - Colored tokens in the reference transcript identify the model that first produced a reliably aligned committed result: **X2** in cyan, **Qwen** in blue, **R2T2** in orange, and **X-ASR** in purple. Once assigned, a color never changes. - The live error rate compares each model's committed output with subtitle cues that ended at least 1.5 seconds before the current playback position. ## 💡 Why X2Streaming-ASR? Fixed chunks or lookaheads make every word wait the same amount of time. Committing exactly at the acoustic boundary gets homophones wrong. Revising partial results makes text flicker and is unsafe for voice agents. Re-encoding the whole history or sliding a short window either slows down on long audio or forgets earlier speech. X2Streaming-ASR learns a per-word commit policy that avoids all four. ## 📊 Results - **Lowest latency on all 12 test sets.** Mean emission latency is 12–109 ms, compared with 194–735 ms for the streaming baselines. - **Best accuracy on 6 test sets.** AISHELL-1, AISHELL-3, WenetSpeech Net, GigaSpeech clean, VoxPopuli, and TED-LIUM. - **Lowest overall error rate in both languages.**