asierhv commited on
Commit
2014dbe
·
verified ·
1 Parent(s): 017ec32

added description and "how to use" example

Browse files
Files changed (1) hide show
  1. README.md +144 -38
README.md CHANGED
@@ -28,46 +28,110 @@ model-index:
28
  value: 17.290976821192054
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 Base Galician
35
 
36
- This model is a fine-tuned version of [openai/whisper-base](https://huggingface.co/openai/whisper-base) on the mozilla-foundation/common_voice_13_0 gl dataset.
37
- It achieves the following results on the evaluation set:
38
- - Loss: 0.4360
39
- - Wer: 17.2910
 
 
 
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: 2.5e-05
59
- - train_batch_size: 128
60
- - eval_batch_size: 64
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: 5000
66
- - mixed_precision_training: Native AMP
67
 
68
- ### Training results
69
 
70
- | Training Loss | Epoch | Step | Validation Loss | Wer |
71
  |:-------------:|:-----:|:----:|:---------------:|:-------:|
72
  | 0.372 | 10.0 | 1000 | 0.4173 | 21.0023 |
73
  | 0.1352 | 20.0 | 2000 | 0.3982 | 18.3620 |
@@ -75,27 +139,57 @@ The following hyperparameters were used during training:
75
  | 0.0371 | 40.0 | 4000 | 0.4310 | 17.4721 |
76
  | 0.0279 | 50.0 | 5000 | 0.4360 | 17.2910 |
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
- ### Framework versions
 
 
 
 
 
 
80
 
81
- - Transformers 4.37.2
82
- - Pytorch 2.2.0+cu121
83
- - Datasets 2.16.1
84
- - Tokenizers 0.15.1
 
85
 
86
  ## Citation
87
 
88
- If you use these models in your research, please cite:
89
 
90
  ```bibtex
91
  @misc{dezuazo2025whisperlmimprovingasrmodels,
92
- title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
93
- author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
94
- year={2025},
95
- eprint={2503.23542},
96
- archivePrefix={arXiv},
97
- primaryClass={cs.CL},
98
- url={https://arxiv.org/abs/2503.23542},
99
  }
100
  ```
101
 
@@ -103,9 +197,21 @@ Please, check the related paper preprint in
103
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
104
  for more details.
105
 
106
- ## Licensing
 
 
107
 
108
  This model is available under the
109
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
110
  You are free to use, modify, and distribute this model as long as you credit
111
- the original creators.
 
 
 
 
 
 
 
 
 
 
 
28
  value: 17.290976821192054
29
  ---
30
 
 
 
 
31
  # Whisper Base Galician
32
 
33
+ ## Model summary
34
+
35
+ **Whisper Base Galician** is an automatic speech recognition (ASR) model for **Galician (gl)** speech. It is fine-tuned from [openai/whisper-base] on the **Galician portion of Mozilla Common Voice 13.0**, achieving a **Word Error Rate (WER) of 17.29%** on the Common Voice evaluation split.
36
+
37
+ This model provides a balance between performance and model size, suitable for medium-scale transcription tasks in Galician.
38
+
39
+ ---
40
 
41
  ## Model description
42
 
43
+ * **Architecture:** Transformer-based encoder–decoder (Whisper)
44
+ * **Base model:** openai/whisper-base
45
+ * **Language:** Galician (gl)
46
+ * **Task:** Automatic Speech Recognition (ASR)
47
+ * **Output:** Text transcription in Galician
48
+ * **Decoding:** Autoregressive sequence-to-sequence decoding
49
+
50
+ Leveraging Whisper’s multilingual pretraining, this base model is fine-tuned on Galician speech data to provide accurate transcription for a low-resource language, appropriate for research, educational, and media applications.
51
+
52
+ ---
53
+
54
+ ## Intended use
55
+
56
+ ### Primary use cases
57
+
58
+ * Accurate transcription of Galician audio recordings
59
+ * Offline or batch ASR pipelines
60
+ * Research and development in Galician ASR
61
+ * Media, educational, and archival transcription tasks
62
+
63
+ ### Intended users
64
+
65
+ * Researchers working on Galician or low-resource ASR
66
+ * Developers building Galician speech applications
67
+ * Academic or institutional users
68
 
69
+ ### Out-of-scope use
70
 
71
+ * Real-time or low-latency ASR without optimization
72
+ * Speech translation tasks
73
+ * Safety-critical applications without validation
74
+
75
+ ---
76
+
77
+ ## Limitations and known issues
78
+
79
+ * Performance may degrade on:
80
+ * Noisy or low-quality recordings
81
+ * Conversational or spontaneous speech
82
+ * Accents underrepresented in Common Voice
83
+ * Transcription errors may occur under challenging acoustic conditions
84
+ * Dataset biases from Common Voice may be reflected in outputs
85
+
86
+ Users are encouraged to evaluate the model on their own data before deployment.
87
+
88
+ ---
89
 
90
  ## Training and evaluation data
91
 
92
+ ### Training data
93
+
94
+ * **Dataset:** Mozilla Common Voice 13.0 (Galician subset)
95
+ * **Data type:** Crowd-sourced, read speech
96
+ * **Preprocessing:**
97
+ * Audio resampled to 16 kHz
98
+ * Text normalized using Whisper tokenizer
99
+ * Filtering of invalid or problematic samples
100
+
101
+ ### Evaluation data
102
+
103
+ * **Dataset:** Mozilla Common Voice 13.0 (Galician evaluation split)
104
+ * **Metric:** Word Error Rate (WER)
105
+
106
+ ---
107
+
108
+ ## Evaluation results
109
+
110
+ | Metric | Value |
111
+ | ---------- | ---------- |
112
+ | WER (eval) | **17.29%** |
113
+
114
+ This reflects the expected performance of a base Whisper model fine-tuned for Galician.
115
+
116
+ ---
117
 
118
  ## Training procedure
119
 
120
  ### Training hyperparameters
121
 
122
+ * Learning rate: 2.5e-5
123
+ * Optimizer: Adam (β1=0.9, β2=0.999, ε=1e-8)
124
+ * LR scheduler: Linear
125
+ * Warmup steps: 500
126
+ * Training steps: 5,000
127
+ * Train batch size: 128
128
+ * Evaluation batch size: 64
129
+ * Seed: 42
130
+ * Mixed precision training: Native AMP
 
131
 
132
+ ### Training results (summary)
133
 
134
+ | Training Loss | Epoch | Step | Validation Loss | WER |
135
  |:-------------:|:-----:|:----:|:---------------:|:-------:|
136
  | 0.372 | 10.0 | 1000 | 0.4173 | 21.0023 |
137
  | 0.1352 | 20.0 | 2000 | 0.3982 | 18.3620 |
 
139
  | 0.0371 | 40.0 | 4000 | 0.4310 | 17.4721 |
140
  | 0.0279 | 50.0 | 5000 | 0.4360 | 17.2910 |
141
 
142
+ ---
143
+
144
+ ## Framework versions
145
+
146
+ - Transformers 4.37.2
147
+ - PyTorch 2.2.0+cu121
148
+ - Datasets 2.16.1
149
+ - Tokenizers 0.15.1
150
+
151
+ ---
152
+
153
+ ## How to use
154
+
155
+ ```python
156
+ from transformers import pipeline
157
+
158
+ hf_model = "HiTZ/whisper-base-gl" # replace with actual repo ID
159
+ device = 0 # set to -1 for CPU
160
+
161
+ pipe = pipeline(
162
+ task="automatic-speech-recognition",
163
+ model=hf_model,
164
+ device=device
165
+ )
166
 
167
+ result = pipe("audio.wav")
168
+ print(result["text"])
169
+ ```
170
+
171
+ ---
172
+
173
+ ## Ethical considerations and risks
174
 
175
+ * This model transcribes speech and may process personal data.
176
+ * Users should ensure compliance with applicable data protection laws (e.g., GDPR).
177
+ * The model should not be used for surveillance or non-consensual audio processing.
178
+
179
+ ---
180
 
181
  ## Citation
182
 
183
+ If you use this model in your research, please cite:
184
 
185
  ```bibtex
186
  @misc{dezuazo2025whisperlmimprovingasrmodels,
187
+ title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
188
+ author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
189
+ year={2025},
190
+ eprint={2503.23542},
191
+ archivePrefix={arXiv},
192
+ primaryClass={cs.CL}
 
193
  }
194
  ```
195
 
 
197
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
198
  for more details.
199
 
200
+ ---
201
+
202
+ ## License
203
 
204
  This model is available under the
205
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
206
  You are free to use, modify, and distribute this model as long as you credit
207
+ the original creators.
208
+
209
+ ---
210
+
211
+ ## Contact and attribution
212
+
213
+ * Fine-tuning and evaluation: HiTZ/Aholab - Basque Center for Language Technology
214
+ * Base model: OpenAI Whisper
215
+ * Dataset: Mozilla Common Voice
216
+
217
+ For questions or issues, please open an issue in the model repository.