asierhv commited on
Commit
bbfed74
·
verified ·
1 Parent(s): 7c027c0

added description and "how to use" example

Browse files
Files changed (1) hide show
  1. README.md +127 -37
README.md CHANGED
@@ -28,45 +28,92 @@ model-index:
28
  value: 5.995427264932838
29
  ---
30
 
31
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
32
- should probably proofread and complete it, then remove this comment. -->
33
-
34
  # Whisper Medium Catalan
35
 
36
- This model is a fine-tuned version of [openai/whisper-medium](https://huggingface.co/openai/whisper-medium) on the mozilla-foundation/common_voice_13_0 ca dataset.
37
- It achieves the following results on the evaluation set:
38
- - Loss: 0.1434
39
- - Wer: 5.9954
 
 
 
40
 
41
  ## Model description
42
 
43
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- ## Intended uses & limitations
 
 
46
 
47
- More information needed
 
 
 
 
 
 
 
 
 
 
48
 
49
  ## Training and evaluation data
50
 
51
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  ## Training procedure
54
 
55
  ### Training hyperparameters
56
 
57
- The following hyperparameters were used during training:
58
- - learning_rate: 1e-05
59
- - train_batch_size: 64
60
- - eval_batch_size: 32
61
- - seed: 42
62
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
63
- - lr_scheduler_type: linear
64
- - lr_scheduler_warmup_steps: 500
65
- - training_steps: 10000
66
 
67
- ### Training results
68
 
69
- | Training Loss | Epoch | Step | Validation Loss | Wer |
70
  |:-------------:|:-----:|:-----:|:---------------:|:------:|
71
  | 0.1158 | 1.05 | 1000 | 0.1846 | 8.3630 |
72
  | 0.0184 | 3.05 | 2000 | 0.2017 | 8.0629 |
@@ -79,27 +126,57 @@ The following hyperparameters were used during training:
79
  | 0.0695 | 17.03 | 9000 | 0.1434 | 5.9954 |
80
  | 0.0186 | 19.03 | 10000 | 0.1706 | 6.1097 |
81
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
- ### Framework versions
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
- - Transformers 4.33.0.dev0
86
- - Pytorch 2.0.1+cu117
87
- - Datasets 2.14.4
88
- - Tokenizers 0.13.3
 
 
 
89
 
90
  ## Citation
91
 
92
- If you use these models in your research, please cite:
93
 
94
  ```bibtex
95
  @misc{dezuazo2025whisperlmimprovingasrmodels,
96
- title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
97
- author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
98
- year={2025},
99
- eprint={2503.23542},
100
- archivePrefix={arXiv},
101
- primaryClass={cs.CL},
102
- url={https://arxiv.org/abs/2503.23542},
103
  }
104
  ```
105
 
@@ -107,9 +184,22 @@ Please, check the related paper preprint in
107
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
108
  for more details.
109
 
110
- ## Licensing
 
 
111
 
112
  This model is available under the
113
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
114
  You are free to use, modify, and distribute this model as long as you credit
115
- the original creators.
 
 
 
 
 
 
 
 
 
 
 
 
28
  value: 5.995427264932838
29
  ---
30
 
 
 
 
31
  # Whisper Medium Catalan
32
 
33
+ ## Model summary
34
+
35
+ **Whisper Medium Catalan** is an automatic speech recognition (ASR) model for **Catalan (ca)** speech. It is fine-tuned from [openai/whisper-medium] on the **Catalan subset of Mozilla Common Voice 13.0**, achieving a **Word Error Rate (WER) of 5.995%** on the evaluation split.
36
+
37
+ This model balances transcription accuracy and speed, offering higher performance than small variants while remaining computationally efficient.
38
+
39
+ ---
40
 
41
  ## Model description
42
 
43
+ * **Architecture:** Transformer-based encoder–decoder (Whisper)
44
+ * **Base model:** openai/whisper-medium
45
+ * **Language:** Catalan (ca)
46
+ * **Task:** Automatic Speech Recognition (ASR)
47
+ * **Output:** Text transcription in Catalan
48
+ * **Decoding:** Autoregressive sequence-to-sequence decoding
49
+
50
+ Fine-tuned to improve transcription quality on Catalan audio.
51
+
52
+ ---
53
+
54
+ ## Intended use
55
+
56
+ ### Primary use cases
57
+
58
+ * High-accuracy transcription of Catalan audio
59
+ * Research and development in Catalan ASR
60
+ * Media, educational, or accessibility applications
61
+
62
+ ### Out-of-scope use
63
 
64
+ * Real-time transcription without optimization
65
+ * Speech translation
66
+ * Safety-critical applications without further validation
67
 
68
+ ---
69
+
70
+ ## Limitations and known issues
71
+
72
+ * Performance may degrade on:
73
+ * Noisy or low-quality recordings
74
+ * Conversational or spontaneous speech
75
+ * Regional dialects not well represented in Common Voice
76
+ * Occasional transcription errors on difficult audio
77
+
78
+ ---
79
 
80
  ## Training and evaluation data
81
 
82
+ * **Dataset:** Mozilla Common Voice 13.0 (Catalan subset)
83
+ * **Data type:** Crowd-sourced, read speech
84
+ * **Preprocessing:**
85
+ * Audio resampled to 16 kHz
86
+ * Text normalized using Whisper tokenizer
87
+ * Filtering of invalid or problematic samples
88
+
89
+ * **Evaluation metric:** Word Error Rate (WER) on held-out evaluation set
90
+
91
+ ---
92
+
93
+ ## Evaluation results
94
+
95
+ | Metric | Value |
96
+ | ---------- | ---------- |
97
+ | WER (eval) | **5.995%** |
98
+
99
+ ---
100
 
101
  ## Training procedure
102
 
103
  ### Training hyperparameters
104
 
105
+ * Learning rate: 1e-5
106
+ * Optimizer: Adam (β1=0.9, β2=0.999, ε=1e-8)
107
+ * LR scheduler: Linear
108
+ * Warmup steps: 500
109
+ * Training steps: 10,000
110
+ * Train batch size: 64
111
+ * Eval batch size: 32
112
+ * Seed: 42
 
113
 
114
+ ### Training results (summary)
115
 
116
+ | Training Loss | Epoch | Step | Validation Loss | WER |
117
  |:-------------:|:-----:|:-----:|:---------------:|:------:|
118
  | 0.1158 | 1.05 | 1000 | 0.1846 | 8.3630 |
119
  | 0.0184 | 3.05 | 2000 | 0.2017 | 8.0629 |
 
126
  | 0.0695 | 17.03 | 9000 | 0.1434 | 5.9954 |
127
  | 0.0186 | 19.03 | 10000 | 0.1706 | 6.1097 |
128
 
129
+ ---
130
+
131
+ ## Framework versions
132
+
133
+ - Transformers 4.33.0.dev0
134
+ - PyTorch 2.0.1+cu117
135
+ - Datasets 2.14.4
136
+ - Tokenizers 0.13.3
137
+
138
+ ---
139
+
140
+ ## How to use
141
 
142
+ ```python
143
+ from transformers import pipeline
144
+
145
+ hf_model = "HiTZ/whisper-medium-ca" # replace with actual repo ID
146
+ device = 0 # set to -1 for CPU
147
+
148
+ pipe = pipeline(
149
+ task="automatic-speech-recognition",
150
+ model=hf_model,
151
+ device=device
152
+ )
153
+
154
+ result = pipe("audio.wav")
155
+ print(result["text"])
156
+ ```
157
+
158
+ ---
159
 
160
+ ## Ethical considerations and risks
161
+
162
+ * This model transcribes speech and may process personal data.
163
+ * Users should ensure compliance with applicable data protection laws (e.g., GDPR).
164
+ * The model should not be used for surveillance or non-consensual audio processing.
165
+
166
+ ---
167
 
168
  ## Citation
169
 
170
+ If you use this model in your research, please cite:
171
 
172
  ```bibtex
173
  @misc{dezuazo2025whisperlmimprovingasrmodels,
174
+ title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
175
+ author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
176
+ year={2025},
177
+ eprint={2503.23542},
178
+ archivePrefix={arXiv},
179
+ primaryClass={cs.CL}
 
180
  }
181
  ```
182
 
 
184
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
185
  for more details.
186
 
187
+ ---
188
+
189
+ ## License
190
 
191
  This model is available under the
192
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
193
  You are free to use, modify, and distribute this model as long as you credit
194
+ the original creators.
195
+
196
+ ---
197
+
198
+ ## Contact and attribution
199
+
200
+ * Fine-tuning and evaluation: HiTZ/Aholab - Basque Center for Language Technology
201
+ * Base model: OpenAI Whisper
202
+ * Dataset: Mozilla Common Voice
203
+
204
+ For questions or issues, please open an issue in the model repository.
205
+