mahwizzzz commited on
Commit
bc58f46
·
verified ·
1 Parent(s): 7e58d00

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +163 -0
README.md ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ur
4
+ - sd
5
+ license: apache-2.0
6
+ pretty_name: Canopy-M
7
+ pipeline_tag: automatic-speech-recognition
8
+ library_name: pytorch
9
+ tags:
10
+ - automatic-speech-recognition
11
+ - speech
12
+ - ctc
13
+ - conformer
14
+ - urdu
15
+ - sindhi
16
+ ---
17
+
18
+ # Canopy-M
19
+
20
+ Canopy-M was trained on Urdu and Sindhi. The numbers below are the evaluation.
21
+
22
+ | | Urdu `urd` | Sindhi `snd` | Macro |
23
+ |---|---:|---:|---:|
24
+ | CER | 0.132 [0.065, 0.211] | 0.107 [0.091, 0.123] | 0.119 |
25
+ | WER | 0.267 [0.166, 0.383] | 0.271 [0.240, 0.304] | 0.269 |
26
+ | Utterances | 14,681 | 496 | |
27
+ | Speakers | 63 | 164 | |
28
+
29
+
30
+ ![Canopy-M versus Whisper on the Urdu and Sindhi development sets](figures/overview_cer_wer.png)
31
+
32
+ ## Model
33
+
34
+ | | |
35
+ |---|---|
36
+ | Architecture | Conformer-CTC, Metro-style Macaron blocks |
37
+ | Size | 57.9M inference parameters, d=384, 12 layers, 6 heads |
38
+ | Languages | Urdu (id 1), Sindhi (id 2). Id 0 is unconditioned |
39
+ | Conditioning | language embedding and a language-ID head |
40
+ | Tokenizer | character, `char_urd_snd` |
41
+ | Frontend | 16 kHz, 80-bin log-mel, 4× conv subsampling, 25 frames/s |
42
+ | Objective | `(1 − 0.3) · CTC + 0.3 · auxiliary CTC` at layer 6 |
43
+ | Decoder in this table | greedy CTC, no n-gram |
44
+ | Training | 40,000 steps, bf16, RTX 3090, about 9,114 hours of audio seen, ~50/50 Urdu/Sindhi |
45
+ | Code | Apache-2.0 |
46
+
47
+
48
+ ## Use
49
+
50
+ ```python
51
+ from canopy.inference.transcriber import Transcriber
52
+
53
+ asr = Transcriber.from_checkpoint("canopy-m.pt", device="cuda")
54
+ print(asr.transcribe("urdu.wav", language="urd"))
55
+ print(asr.transcribe("sindhi.wav", language="snd"))
56
+ ```
57
+
58
+ Pass `urd` or `snd`. That selects the language embedding and restricts the CTC vocabulary to that language.
59
+
60
+ ## Training data
61
+
62
+ About **186.7 hours** used in training.
63
+
64
+ | Language | Source | Train hours | Dev hours | Labels |
65
+ |---|---|---:|---:|---|
66
+ | Urdu | Common Voice + mahwiz + UrduSpeech | ~79.6 | ~17 | human |
67
+ | Sindhi | Common Voice | 71.5 | 0.10 | human; mostly unvalidated `other` |
68
+ | Sindhi | FLEURS `sd_in` | 12.3 | 1.33 | human, CC-BY-4.0 |
69
+
70
+ ## Benchmark
71
+
72
+ Same development clips and the same `eval_norm` for every system. Whisper is forced to the `urdu` or `sindhi` token, fp16, greedy, `max_new_tokens=225`.
73
+
74
+ | System | Params | Urdu CER | Urdu WER | Sindhi CER | Sindhi WER | Macro CER |
75
+ |---|---:|---:|---:|---:|---:|---:|
76
+ | **Canopy-M** | 57.9M | **0.132** | **0.267** | **0.107** | **0.271** | **0.119** |
77
+ | Whisper-tiny | 39M | 1.024 | 1.477 | 1.430 | 1.599 | 1.227 |
78
+ | Whisper-base | 74M | 0.855 | 1.247 | 0.624 | 1.083 | 0.739 |
79
+ | whisper-small-urdu | 244M | 0.177 | 0.330 | not run | not run | — |
80
+
81
+ `whisper-small-urdu` is `khawajaaliarshad/whisper-small-urdu`, an Urdu-only fine-tune, so it was not run on Sindhi. A value above 1.0 means the output is longer than the reference, usually a repetition or the wrong script.
82
+
83
+ ![Model size against median utterance CER](figures/size_vs_cer.png)
84
+
85
+ ### Urdu by source
86
+
87
+ 14,681 utterances, 63 speakers: Common Voice 7,772 / 54 speakers, UrduSpeech 4,296 / 7, mahwiz 2,613 / 2.
88
+
89
+ | System | CV CER | UrduSpeech CER | mahwiz CER |
90
+ |---|---:|---:|---:|
91
+ | Canopy-M | 0.248 | 0.022 | 0.027 |
92
+ | Whisper-tiny | 1.505 | 0.642 | 0.451 |
93
+ | Whisper-base | 1.520 | 0.209 | 0.283 |
94
+ | whisper-small-urdu | 0.278 | 0.069 | 0.111 |
95
+
96
+ ![Urdu development CER and WER by source](figures/urdu_by_source.png)
97
+
98
+ Paired speaker-cluster test, Δ = whisper-small-urdu minus Canopy-M. Positive means Canopy-M makes fewer errors. “No clear difference” means the 95% interval includes zero.
99
+
100
+ | Subset | ΔCER [95% CI] | Verdict |
101
+ |---|---|---|
102
+ | All Urdu | +0.046 [−0.003, +0.118] | no clear difference |
103
+ | Common Voice | +0.030 [−0.042, +0.184] | no clear difference |
104
+ | UrduSpeech | +0.047 [+0.021, +0.090] | Canopy-M lower CER |
105
+ | mahwiz | +0.084 [+0.074, +0.099] | Canopy-M lower CER |
106
+
107
+ whisper-small-urdu was fine-tuned on Common Voice Urdu 24.0 with its own split, so its Common Voice number may include clips it trained on. Canopy-M trained on the UrduSpeech and mahwiz training splits, so those two rows are in-domain for Canopy-M.
108
+
109
+ ### Sindhi by source
110
+
111
+ 496 utterances, 164 speakers: Common Voice 70 / 14 speakers, FLEURS 426 / 150 speakers. FLEURS `sd_in` is India-recorded Sindhi.
112
+
113
+ | System | CV CER | FLEURS CER |
114
+ |---|---:|---:|
115
+ | Canopy-M | 0.286 | 0.095 |
116
+ | Whisper-tiny | 1.911 | 1.399 |
117
+ | Whisper-base | 0.690 | 0.619 |
118
+
119
+ ![Sindhi development CER and WER by source](figures/sindhi_by_source.png)
120
+
121
+ Against zero-shot Whisper-base, Canopy-M is lower on every Sindhi subset. All Sindhi ΔCER is +0.517 [+0.470, +0.568]. Whisper-base did not train on this Sindhi data. Canopy-M did.
122
+
123
+ ### Robustness
124
+
125
+ Median utterance CER is 0.059 on Urdu and 0.078 on Sindhi. Canopy-M produced no runaway outputs (hypothesis longer than 3× the reference) and no empty outputs. Whisper-tiny runaway rate is 10.3% on Urdu and 9.1% on Sindhi.
126
+
127
+ ![Per-utterance CER](figures/utterance_cer_distribution.png)
128
+
129
+ ![Runaway rate](figures/runaway_rate.png)
130
+
131
+ ![Paired differences](figures/paired_differences.png)
132
+
133
+ Decode real-time factor on an RTX 3090 is about 0.0006 for Canopy-M, 0.0218 for Whisper-tiny, 0.0100 for Whisper-base, and 0.0069 for whisper-small-urdu. Batch sizes differed, so treat the speed column as indicative.
134
+
135
+ ## Intended use
136
+
137
+ Research transcription of read Urdu and Sindhi at 16 kHz, one language per utterance, with the language given.
138
+
139
+ ## Out of scope
140
+
141
+ Surveillance, speaker identification, and any decision about a person made without review. Production deployment while the test split is unscored. Telephone, broadcast, conversational, and code-switched speech.
142
+
143
+ ## Limitations
144
+
145
+ - These scores are the development split. The test split (Urdu ~37 h, Sindhi FLEURS ~3.3 h plus a small Common Voice test) has not been opened.
146
+ - Sindhi Common Voice development audio is 0.10 hours (70 utterances). Most of the Sindhi score is FLEURS.
147
+ - Common Voice Sindhi training audio is mostly unvalidated `other`, included with `--include-unvalidated`.
148
+ - Urdu Common Voice CER is 0.248. The headline 0.132 is pulled down by UrduSpeech and mahwiz.
149
+ - A wrong language id can cross Urdu and Sindhi, which share a Perso-Arabic script.
150
+ - No word n-gram was used in this table. Fusion can still overwrite a correct acoustic hypothesis.
151
+
152
+ ## Citation
153
+
154
+ ```bibtex
155
+ @software{canopy_m_2026,
156
+ title = {Canopy-M: Conformer-CTC speech recognition for Urdu and Sindhi},
157
+ year = {2026},
158
+ url = {https://github.com/mwzkhalil/canopy},
159
+ license = {Apache-2.0}
160
+ }
161
+ ```
162
+
163
+ Also cite Common Voice, FLEURS, and the Metro-ASR / Conformer designs the block follows.