Align ASR model card with paper and simplify installation and training
Browse files
README.md
CHANGED
|
@@ -5,75 +5,61 @@ language:
|
|
| 5 |
- zh
|
| 6 |
base_model:
|
| 7 |
- Qwen/Qwen3-ASR-1.7B
|
|
|
|
| 8 |
tags:
|
| 9 |
- wenetspeech-min
|
| 10 |
- minnan
|
| 11 |
- southern-min
|
| 12 |
- speech-recognition
|
| 13 |
-
-
|
| 14 |
- qwen3-asr
|
| 15 |
---
|
| 16 |
|
| 17 |
# WenetSpeech-Min ASR Models
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
-
The
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
released.** Model weights and training/inference recipes are provided separately
|
| 28 |
-
from the training data.
|
| 29 |
|
| 30 |
[Code](https://github.com/ASLP-lab/WenetSpeech-Min-Repo) |
|
| 31 |
-
[
|
| 32 |
-
[
|
|
|
|
| 33 |
|
| 34 |
## Available Models
|
| 35 |
|
| 36 |
-
| Model |
|
| 37 |
-
| --- | --- | --- |
|
| 38 |
-
| [Qwen3-ASR-WSM-Min](https://huggingface.co/ASLP-lab/WS-Min-ASR/tree/main/Qwen3-ASR-WSM-Min) | Minnan
|
| 39 |
-
| [Qwen3-ASR-WSM-Mandarin](https://huggingface.co/ASLP-lab/WS-Min-ASR/tree/main/Qwen3-ASR-WSM-Mandarin) |
|
| 40 |
-
| FireRedASR2-AED-WSM
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
is a separate dual-task model; its future weights require the matching WeNet
|
| 45 |
-
code and cannot be loaded using `Qwen3ASRModel`.
|
| 46 |
|
| 47 |
## Install
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
```bash
|
| 52 |
-
git clone https://github.com/ASLP-lab/WenetSpeech-Min-Repo.git
|
| 53 |
-
cd WenetSpeech-Min-Repo
|
| 54 |
-
```
|
| 55 |
-
|
| 56 |
-
The relevant recipe directories are:
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
FireRedASR2-AED-WSM/ # Task-conditioned WeNet training and dual-transcript inference
|
| 62 |
-
```
|
| 63 |
|
| 64 |
-
|
| 65 |
|
| 66 |
```bash
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
python -m pip install -r Qwen3-ASR-Min/requirements-vllm.txt
|
| 70 |
```
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
For the Transformers-only backend, install `requirements.txt` instead of
|
| 75 |
-
`requirements-vllm.txt`. Training dependencies and the separate FireRed
|
| 76 |
-
Python 3.10 / WeNet environment are documented in each recipe directory.
|
| 77 |
|
| 78 |
### Model download
|
| 79 |
|
|
@@ -156,55 +142,102 @@ bash Qwen3-ASR-Min/infer.sh --backend transformers
|
|
| 156 |
The output contains the audio identifier, path, transcription target, language,
|
| 157 |
and recognized text. Several audio paths may follow `--audio` for batch inference.
|
| 158 |
|
| 159 |
-
### FireRed
|
| 160 |
|
| 161 |
-
|
| 162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
```bash
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
# Install the WeNet dependencies described in this directory's README first.
|
| 168 |
-
CUDA_VISIBLE_DEVICES=0 bash infer.sh \
|
| 169 |
-
--model-dir /path/to/converted_model_assets \
|
| 170 |
-
--config /path/to/training_output/train.yaml \
|
| 171 |
-
--checkpoint /path/to/training_output/step_XXXXX.pt \
|
| 172 |
--task both
|
| 173 |
```
|
| 174 |
|
| 175 |
-
`--task minnan`
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
adding task tokens to the output vocabulary. The fine-tuned checkpoint must
|
| 179 |
-
contain the trained task embeddings. The public base model alone is insufficient.
|
| 180 |
|
| 181 |
## Training
|
| 182 |
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
|
| 187 |
```json
|
| 188 |
-
{"
|
| 189 |
```
|
| 190 |
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
|
|
|
| 195 |
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
`
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
|
| 209 |
## Acknowledgements
|
| 210 |
|
|
|
|
| 5 |
- zh
|
| 6 |
base_model:
|
| 7 |
- Qwen/Qwen3-ASR-1.7B
|
| 8 |
+
- FireRedTeam/FireRedASR2-AED
|
| 9 |
tags:
|
| 10 |
- wenetspeech-min
|
| 11 |
- minnan
|
| 12 |
- southern-min
|
| 13 |
- speech-recognition
|
| 14 |
+
- paired-transcript-asr
|
| 15 |
- qwen3-asr
|
| 16 |
---
|
| 17 |
|
| 18 |
# WenetSpeech-Min ASR Models
|
| 19 |
|
| 20 |
+
These ASR models accompany
|
| 21 |
+
[WenetSpeech-Min: A Large-Scale Minnan Speech Corpus with Dual Transcriptions for Dialectal Speech Processing](https://arxiv.org/abs/2609.36834).
|
| 22 |
+
WenetSpeech-Min comprises around **10,000 hours of Minnan speech** from online
|
| 23 |
+
media, pairing each utterance with a Minnan transcript and a Mandarin transcript.
|
| 24 |
|
| 25 |
+
The models support **Minnan transcription**, **Mandarin transcription**, and
|
| 26 |
+
**paired-transcript recognition**. Minnan transcripts retain dialectal wording;
|
| 27 |
+
Mandarin transcripts express the same content in written Mandarin, without
|
| 28 |
+
requiring word-by-word alignment with the spoken Minnan.
|
|
|
|
|
|
|
| 29 |
|
| 30 |
[Code](https://github.com/ASLP-lab/WenetSpeech-Min-Repo) |
|
| 31 |
+
[Paper](https://arxiv.org/abs/2609.36834) |
|
| 32 |
+
[Qwen3-ASR](https://huggingface.co/Qwen/Qwen3-ASR-1.7B) |
|
| 33 |
+
[FireRedASR2-AED](https://huggingface.co/FireRedTeam/FireRedASR2-AED)
|
| 34 |
|
| 35 |
## Available Models
|
| 36 |
|
| 37 |
+
| Model | Task | Fine-tuning framework |
|
| 38 |
+
| --- | --- | --- |
|
| 39 |
+
| [Qwen3-ASR-WSM-Min](https://huggingface.co/ASLP-lab/WS-Min-ASR/tree/main/Qwen3-ASR-WSM-Min) | Minnan transcription | ms-swift |
|
| 40 |
+
| [Qwen3-ASR-WSM-Mandarin](https://huggingface.co/ASLP-lab/WS-Min-ASR/tree/main/Qwen3-ASR-WSM-Mandarin) | Mandarin transcription | ms-swift |
|
| 41 |
+
| [FireRedASR2-AED-WSM](https://huggingface.co/ASLP-lab/WS-Min-ASR/tree/main/FireRedASR2-AED-WSM) | Paired-transcript recognition | WeNet |
|
| 42 |
|
| 43 |
+
All three models take Minnan speech as input. Each Qwen checkpoint provides one
|
| 44 |
+
transcription target; FireRedASR2-AED-WSM supports both targets in one model.
|
|
|
|
|
|
|
| 45 |
|
| 46 |
## Install
|
| 47 |
|
| 48 |
+
Follow the official installation instructions for the relevant framework:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
- [Qwen3-ASR environment setup](https://github.com/QwenLM/Qwen3-ASR#environment-setup) for Qwen inference, including the vLLM backend.
|
| 51 |
+
- [ms-swift installation](https://swift.readthedocs.io/en/latest/GetStarted/SWIFT-installation.html) for Qwen fine-tuning.
|
| 52 |
+
- [WeNet installation for training and deployment](https://github.com/wenet-e2e/wenet#install-for-training--deployment) for FireRed fine-tuning and inference.
|
|
|
|
|
|
|
| 53 |
|
| 54 |
+
Clone the training and inference recipes:
|
| 55 |
|
| 56 |
```bash
|
| 57 |
+
git clone https://github.com/ASLP-lab/WenetSpeech-Min-Repo.git
|
| 58 |
+
cd WenetSpeech-Min-Repo
|
|
|
|
| 59 |
```
|
| 60 |
|
| 61 |
+
For FireRed paired-transcript recognition, run
|
| 62 |
+
`bash FireRedASR2-AED-WSM/setup_wenet.sh` to prepare the matching WeNet task-embedding implementation.
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
### Model download
|
| 65 |
|
|
|
|
| 142 |
The output contains the audio identifier, path, transcription target, language,
|
| 143 |
and recognized text. Several audio paths may follow `--audio` for batch inference.
|
| 144 |
|
| 145 |
+
### FireRed paired-transcript recognition
|
| 146 |
|
| 147 |
+
Download the FireRed checkpoint and its tokenizer/CMVN assets:
|
| 148 |
+
|
| 149 |
+
```python
|
| 150 |
+
from huggingface_hub import snapshot_download
|
| 151 |
+
|
| 152 |
+
snapshot_download(
|
| 153 |
+
repo_id="ASLP-lab/WS-Min-ASR",
|
| 154 |
+
allow_patterns=["FireRedASR2-AED-WSM/*"],
|
| 155 |
+
local_dir="pretrained_models/WS-Min-ASR",
|
| 156 |
+
)
|
| 157 |
+
```
|
| 158 |
+
|
| 159 |
+
Run inference from the GitHub repository root:
|
| 160 |
|
| 161 |
```bash
|
| 162 |
+
CUDA_VISIBLE_DEVICES=0 bash FireRedASR2-AED-WSM/infer.sh \
|
| 163 |
+
--model-dir pretrained_models/WS-Min-ASR/FireRedASR2-AED-WSM \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
--task both
|
| 165 |
```
|
| 166 |
|
| 167 |
+
Use `--task minnan` for the Minnan transcript or `--task mandarin` for the
|
| 168 |
+
Mandarin transcript. `--task both` returns `text_minnan` and `text_mandarin`.
|
| 169 |
+
Override the included sample with `--audio /path/to/audio.wav`.
|
|
|
|
|
|
|
| 170 |
|
| 171 |
## Training
|
| 172 |
|
| 173 |
+
The [GitHub repository](https://github.com/ASLP-lab/WenetSpeech-Min-Repo) contains
|
| 174 |
+
the training recipes for all three models. Each recipe reads a JSONL manifest,
|
| 175 |
+
with one training example per line. Use the corresponding format below for
|
| 176 |
+
both training and validation manifests. Audio paths must resolve on the
|
| 177 |
+
training machine.
|
| 178 |
+
|
| 179 |
+
### Qwen3-ASR-WSM-Min: Minnan transcription
|
| 180 |
+
|
| 181 |
+
[Training code](https://github.com/ASLP-lab/WenetSpeech-Min-Repo/tree/main/Qwen3-ASR-Min)
|
| 182 |
+
|
| 183 |
+
Supervision uses the Minnan transcripts of WenetSpeech-Min. The ms-swift
|
| 184 |
+
training format is:
|
| 185 |
|
| 186 |
```json
|
| 187 |
+
{"key":"example_001","messages":[{"role":"user","content":"<audio>"},{"role":"assistant","content":"language Chinese<asr_text>你欲食啥物?"}],"audios":["/path/to/audio/example_001.wav"]}
|
| 188 |
```
|
| 189 |
|
| 190 |
+
```bash
|
| 191 |
+
TRAIN_DATA=/path/to/train.minnan.jsonl \
|
| 192 |
+
VAL_DATA=/path/to/validation.minnan.jsonl \
|
| 193 |
+
bash Qwen3-ASR-Min/train.sh
|
| 194 |
+
```
|
| 195 |
|
| 196 |
+
### Qwen3-ASR-WSM-Mandarin: Mandarin transcription
|
| 197 |
+
|
| 198 |
+
[Training code](https://github.com/ASLP-lab/WenetSpeech-Min-Repo/tree/main/Qwen3-ASR-Mandarin)
|
| 199 |
+
|
| 200 |
+
Training combines MinSpeech with the Mandarin transcripts of WenetSpeech-Min.
|
| 201 |
+
Use the same ms-swift schema with the Mandarin transcript as the assistant target:
|
| 202 |
+
|
| 203 |
+
```json
|
| 204 |
+
{"key":"example_001","messages":[{"role":"user","content":"<audio>"},{"role":"assistant","content":"language Chinese<asr_text>你想吃什么?"}],"audios":["/path/to/audio/example_001.wav"]}
|
| 205 |
+
```
|
| 206 |
+
|
| 207 |
+
```bash
|
| 208 |
+
TRAIN_DATA=/path/to/train.mandarin.jsonl \
|
| 209 |
+
VAL_DATA=/path/to/validation.mandarin.jsonl \
|
| 210 |
+
bash Qwen3-ASR-Mandarin/train.sh
|
| 211 |
+
```
|
| 212 |
+
|
| 213 |
+
### FireRedASR2-AED-WSM: paired-transcript recognition
|
| 214 |
+
|
| 215 |
+
[Training code](https://github.com/ASLP-lab/WenetSpeech-Min-Repo/tree/main/FireRedASR2-AED-WSM)
|
| 216 |
+
|
| 217 |
+
Paired transcripts supervise one model; two learnable task embeddings select
|
| 218 |
+
the output target, and CTC loss is disabled. Represent each recording as two
|
| 219 |
+
WeNet raw JSONL examples sharing the same audio path:
|
| 220 |
+
|
| 221 |
+
```json
|
| 222 |
+
{"key":"example_001_transcribe_minnan","wav":"/path/to/audio/example_001.wav","txt":"你欲食啥物?","task":"transcribe_minnan","lang":"zh"}
|
| 223 |
+
{"key":"example_001_translate_zh","wav":"/path/to/audio/example_001.wav","txt":"你想吃什么?","task":"translate_zh","lang":"zh"}
|
| 224 |
+
```
|
| 225 |
+
|
| 226 |
+
`transcribe_minnan` selects the Minnan transcript; `translate_zh` selects the
|
| 227 |
+
Mandarin transcript. These are the task identifiers used by the implementation.
|
| 228 |
+
|
| 229 |
+
```bash
|
| 230 |
+
BASE_MODEL_DIR=/path/to/wenet-converted-FireRedASR2-AED \
|
| 231 |
+
TRAIN_DATA=/path/to/train.paired.jsonl \
|
| 232 |
+
VAL_DATA=/path/to/validation.paired.jsonl \
|
| 233 |
+
bash FireRedASR2-AED-WSM/train.sh
|
| 234 |
+
```
|
| 235 |
+
|
| 236 |
+
`BASE_MODEL_DIR` contains the converted base checkpoint `wenet_firered.pt`,
|
| 237 |
+
`global_cmvn`, `train_bpe1000.model`, and `units.txt`. See the
|
| 238 |
+
[FireRed training recipe](https://github.com/ASLP-lab/WenetSpeech-Min-Repo/tree/main/FireRedASR2-AED-WSM)
|
| 239 |
+
for base-model conversion. Each recipe directory also includes `prepare_data.py`
|
| 240 |
+
for converting paired audio/transcript manifests to its training format.
|
| 241 |
|
| 242 |
## Acknowledgements
|
| 243 |
|