Views
No views yet
1from fireredasr2s.fireredasr2 import FireRedAsr2, FireRedAsr2Config
2
3batch_uttid = ["hello_zh", "hello_en"]
4batch_wav_path = ["assets/hello_zh.wav", "assets/hello_en.wav"]
5
6# FireRedASR2-LLM Configuration
7asr_config = FireRedAsr2Config(
8 use_gpu=True,
9 decode_min_len=0,
10 repetition_penalty=1.0,
11 llm_length_penalty=0.0,
12 temperature=1.0
13)
14
15# Load the model
16model = FireRedAsr2.from_pretrained("llm", "FireRedTeam/FireRedASR2-LLM", asr_config)
17
18# Transcribe
19results = model.transcribe(batch_uttid, batch_wav_path)
20print(results)
21# [{'uttid': 'hello_zh', 'text': '你好世界', 'rtf': '0.0681', 'wav': 'assets/hello_zh.wav'}, {'uttid': 'hello_en', 'text': 'hello speech', 'rtf': '0.0681', 'wav': 'assets/hello_en.wav'}]| Metric | FireRedASR2-LLM | Doubao-ASR | Qwen3-ASR | Fun-ASR |
|---|---|---|---|---|
| Avg CER (Mandarin, 4 sets) | 2.89 | 3.69 | 3.76 | 4.16 |
| Avg CER (Dialects, 19 sets) | 11.55 | 15.39 | 11.85 | 12.76 |
ffmpeg -i <input_audio_path> -ar 16000 -ac 1 -acodec pcm_s16le -f wav <output_wav_path>1@article{xu2026fireredasr2s,
2 title={FireRedASR2S: A State-of-the-Art Industrial-Grade All-in-One Automatic Speech Recognition System},
3 author={Xu, Kaituo and Jia, Yan and Huang, Kai and Chen, Junjie and Li, Wenpeng and Liu, Kun and Xie, Feng-Long and Tang, Xu and Hu, Yao},
4 journal={arXiv preprint arXiv:2603.10420},
5 year={2026}
6}