asierhv commited on
Commit
28c4020
·
verified ·
1 Parent(s): f9ab876

added description and "how to use" example

Browse files
Files changed (1) hide show
  1. README.md +125 -43
README.md CHANGED
@@ -28,73 +28,143 @@ model-index:
28
  value: 8.266774443952604
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 Small Spanish
35
 
36
- This model is a fine-tuned version of [openai/whisper-small](https://huggingface.co/openai/whisper-small) on the mozilla-foundation/common_voice_13_0 es dataset.
37
- It achieves the following results on the evaluation set:
38
- - Loss: 0.2212
39
- - Wer: 8.2668
 
 
 
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: 5000
 
 
 
 
 
 
 
 
 
66
 
67
- ### Training results
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
- | Training Loss | Epoch | Step | Validation Loss | Wer |
70
- |:-------------:|:-----:|:----:|:---------------:|:------:|
71
- | 0.132 | 2.0 | 1000 | 0.2461 | 9.5267 |
72
- | 0.1288 | 4.01 | 2000 | 0.2251 | 8.5215 |
73
- | 0.0814 | 6.01 | 3000 | 0.2212 | 8.2668 |
74
- | 0.0905 | 8.01 | 4000 | 0.2310 | 8.4997 |
75
- | 0.0319 | 10.02 | 5000 | 0.2358 | 8.5343 |
76
 
 
77
 
78
- ### Framework versions
 
 
79
 
80
- - Transformers 4.33.0.dev0
81
- - Pytorch 2.0.1+cu117
82
- - Datasets 2.14.4
83
- - Tokenizers 0.13.3
84
 
85
  ## Citation
86
 
87
- If you use these models in your research, please cite:
88
 
89
  ```bibtex
90
  @misc{dezuazo2025whisperlmimprovingasrmodels,
91
- title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
92
- author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
93
- year={2025},
94
- eprint={2503.23542},
95
- archivePrefix={arXiv},
96
- primaryClass={cs.CL},
97
- url={https://arxiv.org/abs/2503.23542},
98
  }
99
  ```
100
 
@@ -102,9 +172,21 @@ Please, check the related paper preprint in
102
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
103
  for more details.
104
 
105
- ## Licensing
 
 
106
 
107
  This model is available under the
108
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
109
  You are free to use, modify, and distribute this model as long as you credit
110
- the original creators.
 
 
 
 
 
 
 
 
 
 
 
28
  value: 8.266774443952604
29
  ---
30
 
 
 
 
31
  # Whisper Small Spanish
32
 
33
+ ## Model summary
34
+
35
+ **Whisper Small Spanish** is an automatic speech recognition (ASR) model for **Spanish (es)**, fine-tuned from [openai/whisper-small] on the **Spanish subset of Mozilla Common Voice 13.0**. It achieves a **Word Error Rate (WER) of 8.2668%** on the evaluation split.
36
+
37
+ This model provides a good balance between transcription accuracy and computational efficiency, suitable for applications requiring relatively low-latency ASR with decent quality.
38
+
39
+ ---
40
 
41
  ## Model description
42
 
43
+ * **Architecture:** Transformer-based encoder–decoder (Whisper Small)
44
+ * **Base model:** openai/whisper-small
45
+ * **Language:** Spanish (es)
46
+ * **Task:** Automatic Speech Recognition (ASR)
47
+ * **Output:** Text transcription in Spanish
48
+ * **Decoding:** Autoregressive sequence-to-sequence decoding
49
+
50
+ Compared to Whisper Base, this model is slightly larger and generally more accurate, particularly for standard read Spanish.
51
+
52
+ ---
53
+
54
+ ## Intended use
55
+
56
+ ### Primary use cases
57
+
58
+ * Real-time or batch transcription of Spanish speech
59
+ * Research or experimentation with Spanish ASR
60
+ * Applications with moderate hardware resources where Whisper Medium or Large is too heavy
61
 
62
+ ### Limitations
63
 
64
+ * Performance may degrade for:
65
+ * Noisy or overlapping speech
66
+ * Regional accents or dialects not well represented in Common Voice
67
+ * Very fast conversational speech
68
+
69
+ * Not recommended for safety-critical or professional-level transcription tasks.
70
+
71
+ ---
72
 
73
  ## Training and evaluation data
74
 
75
+ * **Dataset:** Mozilla Common Voice 13.0 (Spanish subset)
76
+ * **Data type:** Crowd-sourced read speech
77
+ * **Preprocessing:**
78
+ * Audio resampled to 16 kHz
79
+ * Text normalized using Whisper tokenizer
80
+ * Invalid or corrupted samples removed
81
+
82
+ * **Evaluation metric:** Word Error Rate (WER) on held-out evaluation set
83
+
84
+ ---
85
+
86
+ ## Evaluation results
87
+
88
+ | Metric | Value |
89
+ | ---------- | ---------- |
90
+ | WER (eval) | **8.2668%** |
91
+
92
+ ---
93
 
94
  ## Training procedure
95
 
96
  ### Training hyperparameters
97
 
98
+ * Learning rate: 1e-5
99
+ * Optimizer: Adam (β1=0.9, β2=0.999, ε=1e-8)
100
+ * LR scheduler: Linear
101
+ * Warmup steps: 500
102
+ * Training steps: 5000
103
+ * Train batch size: 64
104
+ * Eval batch size: 32
105
+ * Seed: 42
106
+
107
+ ### Training results (summary)
108
+
109
+ | Training Loss | Epoch | Step | Validation Loss | WER |
110
+ |:-------------:|:-----:|:----:|:---------------:|:-------:|
111
+ | 0.1320 | 2.0 | 1000 | 0.2461 | 9.5267 |
112
+ | 0.1288 | 4.01 | 2000 | 0.2251 | 8.5215 |
113
+ | 0.0814 | 6.01 | 3000 | 0.2212 | 8.2668 |
114
+ | 0.0905 | 8.01 | 4000 | 0.2310 | 8.4997 |
115
+ | 0.0319 | 10.02 | 5000 | 0.2358 | 8.5343 |
116
 
117
+ ---
118
+
119
+ ## Framework versions
120
+
121
+ - Transformers 4.33.0.dev0
122
+ - PyTorch 2.0.1+cu117
123
+ - Datasets 2.14.4
124
+ - Tokenizers 0.13.3
125
+
126
+ ---
127
+
128
+ ## Example usage
129
+
130
+ ```python
131
+ from transformers import pipeline
132
+
133
+ hf_model = "HiTZ/whisper-small-es" # replace with actual repo ID
134
+ device = 0 # -1 for CPU
135
+
136
+ pipe = pipeline(
137
+ task="automatic-speech-recognition",
138
+ model=hf_model,
139
+ device=device
140
+ )
141
+
142
+ result = pipe("audio.wav")
143
+ print(result["text"])
144
+ ```
145
 
146
+ ---
 
 
 
 
 
 
147
 
148
+ ## Ethical considerations and risks
149
 
150
+ * This model transcribes speech and may process personal data.
151
+ * Users should ensure compliance with applicable data protection laws (e.g., GDPR).
152
+ * The model should not be used for surveillance or non-consensual audio processing.
153
 
154
+ ---
 
 
 
155
 
156
  ## Citation
157
 
158
+ If you use this model in your research, please cite:
159
 
160
  ```bibtex
161
  @misc{dezuazo2025whisperlmimprovingasrmodels,
162
+ title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
163
+ author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
164
+ year={2025},
165
+ eprint={2503.23542},
166
+ archivePrefix={arXiv},
167
+ primaryClass={cs.CL}
 
168
  }
169
  ```
170
 
 
172
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
173
  for more details.
174
 
175
+ ---
176
+
177
+ ## License
178
 
179
  This model is available under the
180
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
181
  You are free to use, modify, and distribute this model as long as you credit
182
+ the original creators.
183
+
184
+ ---
185
+
186
+ ## Contact and attribution
187
+
188
+ * Fine-tuning and evaluation: HiTZ/Aholab - Basque Center for Language Technology
189
+ * Base model: OpenAI Whisper
190
+ * Dataset: Mozilla Common Voice
191
+
192
+ For questions or issues, please open an issue in the model repository.