ASLP-lab commited on
Commit
ef2ae18
·
verified ·
1 Parent(s): ac69520

Align ASR model card with paper and simplify installation and training

Browse files
Files changed (1) hide show
  1. README.md +111 -78
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
- - speech-translation
14
  - qwen3-asr
15
  ---
16
 
17
  # WenetSpeech-Min ASR Models
18
 
19
- WenetSpeech-Min ASR provides models for **Minnan (Southern Min) speech with two
20
- transcription targets**: a dialect-preserving Minnan transcript and a Mandarin
21
- transcript of the same speech.
 
22
 
23
- The training corpus contains approximately **10,000 hours of Minnan audio**,
24
- with both Minnan and Mandarin transcripts for each utterance. The input audio
25
- is Minnan for both tasks; “Mandarin” describes the output transcript, not a
26
- separate Mandarin-audio corpus. **The training dataset has not been publicly
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
- [Qwen3-ASR base model](https://huggingface.co/Qwen/Qwen3-ASR-1.7B) |
32
- [FireRedASR2-AED base model](https://huggingface.co/FireRedTeam/FireRedASR2-AED)
 
33
 
34
  ## Available Models
35
 
36
- | Model | Input | Output | Framework | Status |
37
- | --- | --- | --- | --- | --- |
38
- | [Qwen3-ASR-WSM-Min](https://huggingface.co/ASLP-lab/WS-Min-ASR/tree/main/Qwen3-ASR-WSM-Min) | Minnan speech | Minnan transcript | Qwen3-ASR-1.7B, fine-tuned with ms-swift | Available |
39
- | [Qwen3-ASR-WSM-Mandarin](https://huggingface.co/ASLP-lab/WS-Min-ASR/tree/main/Qwen3-ASR-WSM-Mandarin) | Minnan speech | Mandarin transcript | Qwen3-ASR-1.7B, fine-tuned with ms-swift | Available |
40
- | FireRedASR2-AED-WSM | Minnan speech | Minnan or Mandarin transcript, selected by task | FireRedASR2-AED, fine-tuned with a task-conditioned WeNet implementation | In training; weights not uploaded yet |
41
 
42
- The two Qwen directories contain separate, complete fine-tuned models. Load the
43
- selected **subdirectory**, rather than this repository root. FireRedASR2-AED-WSM
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
- ### Clone the code
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
- ```text
59
- Qwen3-ASR-Min/ # Minnan output, ms-swift training and Qwen-ASR inference
60
- Qwen3-ASR-Mandarin/ # Mandarin output, ms-swift training and Qwen-ASR inference
61
- FireRedASR2-AED-WSM/ # Task-conditioned WeNet training and dual-transcript inference
62
- ```
63
 
64
- ### Create the Qwen environment
65
 
66
  ```bash
67
- conda create -n ws-min-qwen python=3.12 -y
68
- conda activate ws-min-qwen
69
- python -m pip install -r Qwen3-ASR-Min/requirements-vllm.txt
70
  ```
71
 
72
- The inference recipe uses **qwen-asr 0.0.4**, **Transformers 4.57.6**, and
73
- **vLLM 0.14.0**. Install a PyTorch/CUDA build compatible with your GPU.
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 dual-transcript inference
160
 
161
- FireRedASR2-AED-WSM is **still in training**. The code recipe supports inference
162
- with a local trained checkpoint, its training YAML, and tokenizer/CMVN assets:
 
 
 
 
 
 
 
 
 
 
 
163
 
164
  ```bash
165
- cd FireRedASR2-AED-WSM
166
- bash setup_wenet.sh
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` requests only the Minnan transcript, while `--task mandarin`
176
- requests only the Mandarin transcript. The dual-task implementation uses learned
177
- continuous task embeddings (`transcribe_minnan` and `translate_zh`) without
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
- Training requires access to suitable user-provided audio and transcripts; the
184
- approximately 10,000-hour WenetSpeech-Min training corpus is **not public yet**.
185
- A shared paired-manifest format is documented in all three recipe directories:
 
 
 
 
 
 
 
 
 
186
 
187
  ```json
188
- {"utt":"example_001","wav_path":"audio/example_001.wav","text_minnan":"你欲食啥物?","text_mandarin":"你想吃什么?"}
189
  ```
190
 
191
- This record is an illustrative schema, not a released training sample. The data
192
- converter for each Qwen recipe selects one transcript; the FireRed converter
193
- creates two task-labelled examples for each audio recording. Split the data
194
- before task expansion, and keep validation and final evaluation sets separate.
 
195
 
196
- | Recipe | Supervision | Default training settings |
197
- | --- | --- | --- |
198
- | Qwen3-ASR-Min | Minnan transcript | Full fine-tuning, BF16, learning rate `1e-5`, 4 epochs, DeepSpeed ZeRO-2 |
199
- | Qwen3-ASR-Mandarin | Mandarin transcript | Full fine-tuning, BF16, learning rate `1e-5`, 4 epochs, DeepSpeed ZeRO-2 |
200
- | FireRedASR2-AED-WSM | Both task-labelled transcripts | WeNet torch DDP, task-embedding learning rate `1e-4`, other parameters `1e-5` |
201
-
202
- The Qwen training entry point is `train.sh`, which delegates to the existing
203
- `run.sh`. Inference uses the new `infer.sh` / `infer.py` entry points. The original
204
- empty `inference.sh` placeholders are retained unchanged. See each directory's
205
- README for dependencies, exact configuration, data conversion, hardware-related
206
- settings, and commands. No training run or benchmark result is implied by this
207
- code release.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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