Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Xiaomi-CocktailASR-1—— 目标说话人语音识别模型

中文 | English


简介

Xiaomi-CocktailASR-1是小米推出的目标说话人语音识别大模型。模型基于大规模多说话人数据训练,在多个多说话人测试集上达到 SOTA 水平,同时在单说话人场景下性能可与主流单人 ASR 模型相媲美。Xiaomi-CocktailASR-1 还具备负样本拒识能力和思维链(Chain-of-Thought)推理能力,能够对识别过程进行可解释的推理。


亮点 🎯

  • 🏆 多说话人 SOTA:在多个主流多说话人测试集(AliMeeting、AMI、LibriMix 等)上达到最优性能。

  • 🎯 单说话人兼容:单说话人测试集上性能与普通 ASR 模型可比。只需同一模型,便能同时兼顾单人与多人场景,无需切换普通 ASR 模型。

  • 🚫 负样本拒识:具备对全非目标说话人音频的拒识能力,有效降低误触发。

  • 🧠 思维链推理:支持 Chain-of-Thought(CoT)模式,对识别结果提供可解释的推理过程。


性能表现

多说话人测试集-模拟(WER% ↓)

模型LibriMix 2mixLibriMix 3mixLibriSpeechMix 2mixLibriSpeechMix 3mix
Xiaomi-CocktailASR-14.1112.292.904.91
Qwen3-ASR68.75106.0492.17160.82
Gemini48.4176.1030.6952.34
StepAudio71.23121.0892.72164.66
previous SOTA works4.84 [1]12.23 [1]5.4 [2]7.6 [2]

[1] Thinking in Cocktail Party: Chain-of-Thought and Reinforcement Learning for Target Speaker Automatic Speech Recognition

[2] Conformer-based target-speaker automatic speech recognition for single-channel audio

多说话人测试集-真实(WER% ↓)

模型AMI SDMAliMeeting Far
Xiaomi-CocktailASR-121.8120.63
Qwen3-ASR38.1839.64
Gemini52.9556.75
StepAudio110.5076.82
Whisper Large-v236.4-
previous SOTA works22.0 [3]27.5 [4]

[3] SQ-Whisper: Speaker-Querying based Whisper Model for Target-Speaker ASR

[4] A Comparative Study on Speaker-attributed Automatic Speech Recognition in Multi-party Meetings

单说话人测试集(Non-empty WER / FRR ↓)

  • 单说话人数据集测试,参考音频为同一人的样本。下表先报告去除空结果后的 WER:
模型LibriSpeechAliMeeting-nearAMI-ihmWenetSpeech(meeting)CommonVoice(zh)
Xiaomi-CocktailASR-11.736.578.895.814.95
Qwen3-ASR-1.7b1.876.3910.565.845.39
StepAudio21.586.8237.545.465.07
Whisper Large-v22.70-16.90-26.8
Gemini-2.5-pro6.7716.1021.0227.5814.01
  • 由于 Xiaomi-CocktailASR-1 模型有拒识能力,因此正样本有小概率误识别为空,导致 WER 有波动;下表报告误拒率(FRR)以说明这一点:
模型LibriSpeechAliMeeting-nearAMI-ihmWenetSpeech(meeting)CommonVoice(zh)
Xiaomi-CocktailASR-10.360.380.0100.73
Qwen3-ASR-1.7b00000
StepAudio200000
Whisper Large-v20-0-0
Gemini-2.5-pro21.3114.9524.3000.003

负样本拒识(拒识率% ↑)

  • 负样本集的生成方式为:随机选取与输入音频无关的说话人音频作为参考音频。
模型LibriSpeech negAishell negChinese in house neg
Xiaomi-CocktailASR-179.5975.3568.54
Qwen3-ASR000
Gemini81.7964.254.7
StepAudio000

思维链(CoT)效果

测试集non-CoT WER ↓CoT WER ↓Δ
LibriMix 2mix4.113.87-0.24
LibriMix 3mix12.28712.285-0.001
LibriSpeechMix 2mix2.902.88-0.02
LibriSpeechMix 3mix4.914.81-0.1

快速开始

环境安装

pip install torch torchaudio transformers soundfile

模型文件结构

从 HuggingFace 下载后,模型目录包含:

Xiaomi-CocktailASR-1/                           # HuggingFace 实际下载路径
├── config.json                    # MicAsrConfig(含 auto_map、text_config、d2v2_config)
├── configuration_mic_asr.py       # 自定义配置类
├── modeling_mic_asr.py            # 自定义模型类(内联 D2V2 音频编码器)
├── feature_extraction_mic_asr.py  # 音频拼接/特征处理
├── d2v2_config.json               # D2V2 音频编码器配置
├── pytorch_model.bin              # 所有权重(D2V2 + Adapter + LLM)
├── tokenizer.json                 # Tokenizer
└── tokenizer_config.json          # Tokenizer 配置

单条推理

给定一段参考说话人音频(ref.wav)和待识别的单人或多人混合音频(target.wav),模型只转录目标说话人的语音。内部会自动完成「参考音频 + 1s 静音 + 目标音频」的拼接。

from transformers import AutoModel

model = AutoModel.from_pretrained(
    "Ease3/Xiaomi-CocktailASR-1", trust_remote_code=True, torch_dtype="bfloat16"
).cuda().eval()

# 标准模式:直接返回目标说话人的转录文本
# prompt:Based on the reference speech at the start, only transcribe the target speaker's speech into text.
text = model("target.wav", "ref_speaker.wav")
print(text)

model(target, ref) 接受音频文件路径、numpy.ndarraytorch.Tensor(16k 单声道,非 16k 会自动重采样)。

思维链推理

CoT 模式下,模型会在 <think> 标签中输出推理过程,在 <answer> 标签中输出最终结果:

# CoT 模式
# prompt:Based on the reference speech at the start, only transcribe the target speaker's speech into text. Please think step by step and provide a detailed reasoning process in <think> </think>.Please output the final answer in <answer> </answer>.
text = model("target.wav", "ref_speaker.wav", cot=True)
print(text)

负样本拒识

当参考说话人不在混合音频中时,模型应输出空文本(拒识)。使用方式与标准推理相同,不需要特殊参数:

# 参考音频对应的说话人不在 target 中 → 模型输出为空
text = model("target.wav", "ref_speaker.wav")
print(text)  # → ""

批量推理

直接对 5 列 TSV(utt_id, wav, text, ref_wav, ref_id)批量转录,无需预拼接——脚本内部逐行调用 model(wav, ref)(在模型内部完成 ref+静音+target 拼接),并严格按文件顺序处理:

CUDA_VISIBLE_DEVICES=0 python tools/test_batch_scp.py \
    --hf_model_dir Ease3/Xiaomi-CocktailASR-1 \
    --input_scp scp.tsv \
    --output_file out/result.txt
# CoT 模式追加 --cot

输出 out/result.txt(预测文本)以及同目录 out/text(参考文本),便于后续打分。


模型下载

模型下载链接
Xiaomi-CocktailASR-1https://huggingface.co/Ease3/Xiaomi-CocktailASR-1

项目结构

├── README.md
├── README_en.md
├── LICENSE
├── .gitignore
├── tools/
│   └── test_batch_scp.py          # 批量推理:直接读tsv文件,内部调 model(wav, ref)
└── demo/                          # 示例音频(正/负样本)

模型定义代码与权重发布在 HuggingFace(Ease3/Xiaomi-CocktailASR-1),经 trust_remote_code 加载,故本仓库不含模型 .py 与权重文件。


Demo

1. 正样本

参考语音待识别语音
https://github.com/user-attachments/assets/da84e4ea-5a9e-4393-b830-bc43b53bf72chttps://github.com/user-attachments/assets/67a55411-d5bc-4f09-bdee-0af36d3c4ef5

识别结果:人们设计AI配方的过程本质上主要还是一个不断试错的过程

2. 负样本

参考语音待识别语音
https://github.com/user-attachments/assets/89fcd03c-ffb0-4568-a4f6-a7876c9dba38https://github.com/user-attachments/assets/4fa981d4-17ea-49ca-8168-447b7b7483cc

识别结果:【空】


Citation

@misc{zhang2026xiaomicocktailasr1technicalreport,
      title={Xiaomi-CocktailASR-1 Technical Report}, 
      author={Yiru Zhang and Hang Su and Lichun Fan and Ying Zeng and Chang Liu and Yifeng Wang and Yuquan Liang and Tao Li and Lian Li and Wenhao Yang and Jian Luan and Cong Zou and Heng Qu},
      year={2026},
      eprint={2609.11274},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2609.11274}, 
}

许可证

本项目基于 Apache License 2.0 开源。

关于 About

No description, website, or topics provided.

语言 Languages

Python100.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
4
Total Commits
峰值: 4次/周
Less
More

核心贡献者 Contributors