YuCeong-May commited on
Commit
d648423
·
verified ·
1 Parent(s): b689db5

Rename to Text-Cue-Guided TS-ASR-Qwen; add model details and TS-Aishell results

Browse files
Files changed (1) hide show
  1. README.md +108 -7
README.md CHANGED
@@ -1,21 +1,122 @@
1
  ---
2
  license: other
3
  license_name: funasr-model-open-source-license-1.1
4
- license_link: https://github.com/modelscope/FunASR/blob/main/MODEL_LICENSE
5
  language:
6
  - zh
7
  pipeline_tag: automatic-speech-recognition
 
 
 
 
 
8
  ---
9
 
10
- # Text-Cue-Guided TS-ASR weights
11
 
12
- `model.pt` is the checkpoint for Text-Cue-Guided TS-ASR, a target-speaker speech
13
- recognizer that transcribes only the speaker who says a given text cue. It holds
14
- every weight the model needs: the cue encoder, the Conformer acoustic encoder,
15
- the audio projector, and Qwen2.5-0.5B with its LoRA adapters.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  - SHA-256: `870aef70a8a8c2b292b3eb959ea4a0907edc751848729070aea04465b449fcf5`
18
- - Inference code and demo: [`YuCeong-May/TS-ASR`](https://huggingface.co/spaces/YuCeong-May/TS-ASR)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  ## Licenses
21
 
 
1
  ---
2
  license: other
3
  license_name: funasr-model-open-source-license-1.1
4
+ license_link: https://huggingface.co/YuCeong-May/Text-Cue-Guided-TS-ASR-Qwen/blob/main/MODEL_LICENSE
5
  language:
6
  - zh
7
  pipeline_tag: automatic-speech-recognition
8
+ base_model: Qwen/Qwen2.5-0.5B
9
+ tags:
10
+ - target-speaker-asr
11
+ - speech-recognition
12
+ - multi-speaker
13
  ---
14
 
15
+ # Text-Cue-Guided TS-ASR-Qwen
16
 
17
+ Text-Cue-Guided TS-ASR-Qwen is a target-speaker speech recognizer. Given a
18
+ recording where several people talk at once and a short **text cue** (a few
19
+ words the target speaker says), it transcribes only the speaker who says the
20
+ cue and ignores everyone else. If nobody says the cue, it rejects the request.
21
+
22
+ - Demo: [Unified-TS-ASR Space](https://huggingface.co/spaces/YuCeong-May/TS-ASR)
23
+ (select "Text-Cue-Guided TS-ASR").
24
+ - Inference code: the `tcg_tsasr` package in the Space repository.
25
+ - Language: Mandarin Chinese, 16 kHz audio. Audio within 20 seconds is recommended.
26
+
27
+ ## Model
28
+
29
+ ```
30
+ text cue --> CueTokenizer --> CueEncoder --------------------.
31
+ v cross-attention in every layer
32
+ 16 kHz audio --> 80-dim fbank --> AcousticEncoder (9 x Conformer) --> AudioProjector --> Qwen2.5-0.5B + LoRA
33
+ ```
34
+
35
+ | Component | Details | Parameters |
36
+ |---|---|---:|
37
+ | Front end | 80-dim kaldi fbank, 25 ms window, 10 ms shift | - |
38
+ | CueEncoder | 8406-unit cue vocabulary (Chinese characters and subwords) + 4 Transformer layers, dim 256 | 7.5 M |
39
+ | AcousticEncoder | 2 x Conv2d (stride 2, 4x subsampling to 25 Hz) + 9 Conformer layers (dim 256, 4 heads, FFN 2048, conv kernel 15); every layer cross-attends to the cue | 27.5 M |
40
+ | AudioProjector | Gated 4-frame Conv1d, stride 2 (12.5 audio tokens/s), bottleneck, projected to 896 | 3.6 M |
41
+ | LLM | Qwen2.5-0.5B (24 layers, hidden 896) with LoRA r = 64, alpha = 128 on q/k/v/o, gate/up/down and lm_head | 630 M base + 45 M LoRA |
42
+
43
+ The LLM is prompted with the cue and generates greedily:
44
+
45
+ - `<psok>cue<peok>transcript` when the target speaker is found. The cue is
46
+ bracketed where it occurs; the demo strips the brackets.
47
+ - `<reject/>` when the cue is not in the audio, or `<psok>cue<peok><reject/>`
48
+ when the cue is heard but not from the target speaker.
49
+
50
+ `model.pt` (1.6 GB) holds every weight the model needs, including the Qwen2.5-0.5B
51
+ base weights, so nothing else is downloaded. The checkpoint also contains a
52
+ training-only speaker-classification head (1.8 M), which inference ignores.
53
 
54
  - SHA-256: `870aef70a8a8c2b292b3eb959ea4a0907edc751848729070aea04465b449fcf5`
55
+
56
+ ```python
57
+ from tcg_tsasr import TextCueGuidedTSASR # from the Space repository
58
+
59
+ asr = TextCueGuidedTSASR.from_pretrained("YuCeong-May/Text-Cue-Guided-TS-ASR-Qwen")
60
+ out = asr.transcribe("examples/0.wav", "附近居民")
61
+ print(out["text"], out["rejected"])
62
+ ```
63
+ ## Results on TS-Aishell
64
+
65
+ TS-Aishell mixes two speakers from AISHELL-1 and the AISHELL-2 test sets (iOS,
66
+ Android, Mic, and a cross-device mix). Each of the five test sets has 6000
67
+ mixtures. The text cue is 2-5 consecutive characters taken from the target
68
+ transcript. Decoding is greedy.
69
+
70
+ ### Text-Cue-Guided TS-ASR-Qwen, by cue length
71
+
72
+ CER / SER / reject rate in %. A rejected utterance is scored on whatever text the
73
+ model produced.
74
+
75
+ | Test set | 2 chars | 3 chars | 4 chars | 5 chars |
76
+ |---|---|---|---|---|
77
+ | aishell1-ts | 4.21 / 20.32 / 0.92 | 2.69 / 17.08 / 0.35 | 2.09 / 15.23 / 0.32 | **1.83** / 13.90 / 0.57 |
78
+ | aishell-ios-ts | 11.56 / 44.55 / 3.67 | 8.77 / 38.73 / 3.12 | 7.22 / 34.32 / 4.47 | **6.34** / 29.25 / 7.58 |
79
+ | aishell-android-ts | 15.00 / 49.98 / 4.70 | 11.26 / 43.78 / 3.57 | 9.60 / 38.75 / 4.18 | **8.76** / 34.58 / 6.50 |
80
+ | aishell-mic-ts | 12.21 / 46.02 / 3.85 | 9.33 / 39.63 / 3.23 | 7.62 / 34.93 / 4.10 | **6.42** / 30.23 / 6.68 |
81
+ | aishell-mix-ts | 8.35 / 37.55 / 2.78 | 5.91 / 32.37 / 2.63 | 4.76 / 28.55 / 3.32 | **3.94** / 23.70 / 5.40 |
82
+
83
+ Longer cues help: going from 2 to 5 characters cuts CER by 42-57 % relative.
84
+
85
+ ### Comparison with Unified-TS-ASR
86
+
87
+ Unified-TS-ASR (Conformer + CTC, 37 M parameters, also in the demo) attends to a
88
+ text cue and an enrollment recording of the target speaker (first 5 s). The table
89
+ compares both models at the 5-character cue; Unified-TS-ASR additionally gets the
90
+ enrollment. Both use the same 6000 mixtures per set, and both CERs are computed
91
+ on the output text, including rejected utterances.
92
+
93
+ | Test set | Text-Cue-Guided TS-ASR-Qwen<br>text cue | Unified-TS-ASR<br>text cue + enrollment |
94
+ |---|---|---|
95
+ | | CER / SER / reject % | CER / SER / reject % |
96
+ | aishell1-ts | **1.83** / **13.90** / 0.57 | 5.12 / 37.98 / 0.13 |
97
+ | aishell-ios-ts | **6.34** / **29.25** / 7.58 | 9.94 / 49.23 / 0.32 |
98
+ | aishell-android-ts | **8.76** / **34.58** / 6.50 | 12.06 / 55.57 / 0.80 |
99
+ | aishell-mic-ts | **6.42** / **30.23** / 6.68 | 9.31 / 47.75 / 0.20 |
100
+ | aishell-mix-ts | **3.94** / **23.70** / 5.40 | 9.27 / 47.77 / 25.53 |
101
+
102
+ - Text-Cue-Guided TS-ASR-Qwen has lower CER on every set (2.9-5.3 points
103
+ absolute) and much lower SER, at about 19x the parameters (715 M vs 37 M)
104
+ and autoregressive decoding.
105
+ - It also rejects more often (5-8 % on AISHELL-2 sets, vs under 1 % for
106
+ Unified-TS-ASR), so it is more conservative when the cue is unclear.
107
+ - Unified-TS-ASR's 25.5 % reject rate on aishell-mix-ts comes from enrollments
108
+ recorded on a different device than the target speech: 33.7 % of those
109
+ mismatched pairs (1502 / 4455) are rejected as "speaker not found", vs 0.9 %
110
+ (14 / 1545) for same-device pairs.
111
+ - The released Unified-TS-ASR checkpoint was trained and evaluated with both cues
112
+ present; text-only or enrollment-only use in the demo is outside that setting.
113
+
114
+ ## Limitations
115
+
116
+ - Mandarin only; the cue must be words the target speaker actually says.
117
+ - Tested on two-speaker mixtures. More speakers, heavy noise or long audio
118
+ (over 20 s) are not evaluated.
119
+ - Cues of 2-5 characters are recommended; longer cues are accepted but untested.
120
 
121
  ## Licenses
122