asierhv commited on
Commit
eb14b9c
·
verified ·
1 Parent(s): 81fb305

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,93 @@ model-index:
28
  value: 13.531181636803376
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 Spanish
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 es dataset.
37
- It achieves the following results on the evaluation set:
38
- - Loss: 0.3281
39
- - Wer: 13.5312
 
 
 
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
 
67
- ### Training results
68
 
69
- | Training Loss | Epoch | Step | Validation Loss | Wer |
70
  |:-------------:|:-----:|:----:|:---------------:|:-------:|
71
  | 0.2173 | 4.0 | 1000 | 0.3409 | 14.8123 |
72
  | 0.0955 | 8.01 | 2000 | 0.3377 | 15.4269 |
@@ -74,27 +122,57 @@ The following hyperparameters were used during training:
74
  | 0.0986 | 16.01 | 4000 | 0.3281 | 13.5312 |
75
  | 0.1272 | 20.02 | 5000 | 0.3423 | 13.7596 |
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 +180,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: 13.531181636803376
29
  ---
30
 
 
 
 
31
  # Whisper Base Spanish
32
 
33
+ ## Model summary
34
+
35
+ **Whisper Base Spanish** is an automatic speech recognition (ASR) model for **Spanish (es)** speech. It is fine-tuned from [openai/whisper-base] on the **Spanish subset of Mozilla Common Voice 13.0**, achieving a **Word Error Rate (WER) of 13.5312%** on the evaluation split.
36
+
37
+ This variant balances transcription quality and model size, suitable for general-purpose Spanish ASR tasks.
38
+
39
+ ---
40
 
41
  ## Model description
42
 
43
+ * **Architecture:** Transformer-based encoder–decoder (Whisper Base)
44
+ * **Base model:** openai/whisper-base
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
+ Fine-tuned for improved transcription quality over Whisper Tiny while remaining lightweight compared to larger Whisper models.
51
+
52
+ ---
53
+
54
+ ## Intended use
55
+
56
+ ### Primary use cases
57
+
58
+ * General-purpose Spanish speech transcription
59
+ * Research and experimentation with Spanish ASR
60
+ * Moderate resource environments where Whisper Large is too heavy
61
+
62
+ ### Out-of-scope use
63
 
64
+ * Professional transcription requiring near-zero WER
65
+ * Very noisy or heavily accented Spanish
66
+ * Safety-critical applications
67
 
68
+ ---
69
+
70
+ ## Limitations and known issues
71
+
72
+ * Performance may vary on:
73
+ * Noisy audio or multi-speaker recordings
74
+ * Regional dialects not well represented in Common Voice
75
+ * Rapid conversational speech
76
+
77
+ * While better than Whisper Tiny, it may still produce transcription errors in difficult conditions.
78
+
79
+ ---
80
 
81
  ## Training and evaluation data
82
 
83
+ * **Dataset:** Mozilla Common Voice 13.0 (Spanish subset)
84
+ * **Data type:** Crowd-sourced read speech
85
+ * **Preprocessing:**
86
+ * Audio resampled to 16 kHz
87
+ * Text normalized using Whisper tokenizer
88
+ * Invalid samples removed
89
+
90
+ * **Evaluation metric:** Word Error Rate (WER) on held-out evaluation set
91
+
92
+ ---
93
+
94
+ ## Evaluation results
95
+
96
+ | Metric | Value |
97
+ | ---------- | ---------- |
98
+ | WER (eval) | **13.5312%** |
99
+
100
+ ---
101
 
102
  ## Training procedure
103
 
104
  ### Training hyperparameters
105
 
106
+ * Learning rate: 2.5e-5
107
+ * Optimizer: Adam (β1=0.9, β2=0.999, ε=1e-8)
108
+ * LR scheduler: Linear
109
+ * Warmup steps: 500
110
+ * Training steps: 5000
111
+ * Train batch size: 128
112
+ * Eval batch size: 64
113
+ * Seed: 42
 
114
 
115
+ ### Training results (summary)
116
 
117
+ | Training Loss | Epoch | Step | Validation Loss | WER |
118
  |:-------------:|:-----:|:----:|:---------------:|:-------:|
119
  | 0.2173 | 4.0 | 1000 | 0.3409 | 14.8123 |
120
  | 0.0955 | 8.01 | 2000 | 0.3377 | 15.4269 |
 
122
  | 0.0986 | 16.01 | 4000 | 0.3281 | 13.5312 |
123
  | 0.1272 | 20.02 | 5000 | 0.3423 | 13.7596 |
124
 
125
+ ---
126
+
127
+ ## Framework versions
128
+
129
+ - Transformers 4.33.0.dev0
130
+ - PyTorch 2.0.1+cu117
131
+ - Datasets 2.14.4
132
+ - Tokenizers 0.13.3
133
+
134
+ ---
135
+
136
+ ## How to use
137
+
138
+ ```python
139
+ from transformers import pipeline
140
+
141
+ hf_model = "HiTZ/whisper-base-es" # replace with actual repo ID
142
+ device = 0 # set to -1 for CPU
143
 
144
+ pipe = pipeline(
145
+ task="automatic-speech-recognition",
146
+ model=hf_model,
147
+ device=device
148
+ )
149
 
150
+ result = pipe("audio.wav")
151
+ print(result["text"])
152
+ ```
153
+
154
+ ---
155
+
156
+ ## Ethical considerations and risks
157
+
158
+ * This model transcribes speech and may process personal data.
159
+ * Users should ensure compliance with applicable data protection laws (e.g., GDPR).
160
+ * The model should not be used for surveillance or non-consensual audio processing.
161
+
162
+ ---
163
 
164
  ## Citation
165
 
166
+ If you use this model in your research, please cite:
167
 
168
  ```bibtex
169
  @misc{dezuazo2025whisperlmimprovingasrmodels,
170
+ title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
171
+ author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
172
+ year={2025},
173
+ eprint={2503.23542},
174
+ archivePrefix={arXiv},
175
+ primaryClass={cs.CL}
 
176
  }
177
  ```
178
 
 
180
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
181
  for more details.
182
 
183
+ ---
184
+
185
+ ## License
186
 
187
  This model is available under the
188
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
189
  You are free to use, modify, and distribute this model as long as you credit
190
+ the original creators.
191
+
192
+ ---
193
+
194
+ ## Contact and attribution
195
+
196
+ * Fine-tuning and evaluation: HiTZ/Aholab - Basque Center for Language Technology
197
+ * Base model: OpenAI Whisper
198
+ * Dataset: Mozilla Common Voice
199
+
200
+ For questions or issues, please open an issue in the model repository.