asierhv commited on
Commit
e9b5f66
·
verified ·
1 Parent(s): fa89d64

added description and "how to use" example

Browse files
Files changed (1) hide show
  1. README.md +118 -41
README.md CHANGED
@@ -28,47 +28,82 @@ model-index:
28
  value: 5.126477928109984
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 Large Spanish
35
 
36
- This model is a fine-tuned version of [openai/whisper-large](https://huggingface.co/openai/whisper-large) on the mozilla-foundation/common_voice_13_0 es dataset.
37
- It achieves the following results on the evaluation set:
38
- - Loss: 0.2663
39
- - Wer: 5.1265
 
 
 
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: 32
60
- - eval_batch_size: 16
61
- - seed: 42
62
- - gradient_accumulation_steps: 2
63
- - total_train_batch_size: 64
64
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
65
- - lr_scheduler_type: linear
66
- - lr_scheduler_warmup_steps: 500
67
- - training_steps: 20000
68
-
69
- ### Training results
70
-
71
- | Training Loss | Epoch | Step | Validation Loss | Wer |
72
  |:-------------:|:-----:|:-----:|:---------------:|:------:|
73
  | 0.0834 | 2.0 | 1000 | 0.1862 | 6.3852 |
74
  | 0.0871 | 4.0 | 2000 | 0.1777 | 5.9175 |
@@ -91,27 +126,57 @@ The following hyperparameters were used during training:
91
  | 0.0004 | 38.02 | 19000 | 0.2618 | 5.1361 |
92
  | 0.0004 | 40.02 | 20000 | 0.2663 | 5.1265 |
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
- ### Framework versions
 
 
 
 
 
 
96
 
97
- - Transformers 4.33.0.dev0
98
- - Pytorch 2.0.1+cu117
99
- - Datasets 2.14.4
100
- - Tokenizers 0.13.3
101
 
102
  ## Citation
103
 
104
- If you use these models in your research, please cite:
105
 
106
  ```bibtex
107
  @misc{dezuazo2025whisperlmimprovingasrmodels,
108
- title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
109
- author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
110
- year={2025},
111
- eprint={2503.23542},
112
- archivePrefix={arXiv},
113
- primaryClass={cs.CL},
114
- url={https://arxiv.org/abs/2503.23542},
115
  }
116
  ```
117
 
@@ -119,9 +184,21 @@ Please, check the related paper preprint in
119
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
120
  for more details.
121
 
122
- ## Licensing
 
 
123
 
124
  This model is available under the
125
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
126
  You are free to use, modify, and distribute this model as long as you credit
127
- the original creators.
 
 
 
 
 
 
 
 
 
 
 
28
  value: 5.126477928109984
29
  ---
30
 
 
 
 
31
  # Whisper Large Spanish
32
 
33
+ ## Model summary
34
+
35
+ **Whisper Large Spanish** is a high-accuracy automatic speech recognition (ASR) model for **Spanish (es)**, fine-tuned from [openai/whisper-large] on the **Spanish subset of Mozilla Common Voice 13.0**. It achieves a **Word Error Rate (WER) of 5.1265%** on the evaluation set.
36
+
37
+ This model is designed for applications that require near state-of-the-art transcription accuracy in Spanish, such as transcription of lectures, podcasts, and other high-quality recordings.
38
+
39
+ ---
40
 
41
  ## Model description
42
 
43
+ * **Architecture:** Transformer-based encoder–decoder (Whisper Large)
44
+ * **Base model:** openai/whisper-large
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
+ Large model offers very high accuracy at the cost of higher computational requirements compared to Medium or Small variants.
51
+
52
+ ---
53
+
54
+ ## Intended use
55
+
56
+ ### Primary use cases
57
+
58
+ * High-accuracy Spanish speech transcription
59
+ * Applications requiring transcription of long-form audio
60
+ * Research in Spanish ASR performance and benchmarking
61
 
62
+ ### Limitations
63
 
64
+ * May underperform in extremely noisy audio or with strong regional accents not well represented in the Common Voice dataset
65
+ * High computational cost for real-time inference
66
+ * Not suitable for legal, medical, or safety-critical applications without human review
67
+
68
+ ---
69
 
70
  ## Training and evaluation data
71
 
72
+ * **Dataset:** Mozilla Common Voice 13.0 (Spanish subset)
73
+ * **Data type:** Crowd-sourced read speech
74
+ * **Preprocessing:**
75
+ * Audio resampled to 16 kHz
76
+ * Text tokenized using Whisper tokenizer
77
+ * Removal of invalid or corrupted samples
78
+
79
+ * **Evaluation metric:** Word Error Rate (WER) on held-out evaluation set
80
+
81
+ ---
82
+
83
+ ## Evaluation results
84
+
85
+ | Metric | Value |
86
+ | ---------- | ---------- |
87
+ | WER (eval) | **5.1265%** |
88
+
89
+ ---
90
 
91
  ## Training procedure
92
 
93
  ### Training hyperparameters
94
 
95
+ * Learning rate: 1e-5
96
+ * Optimizer: Adam (β1=0.9, β2=0.999, ε=1e-8)
97
+ * LR scheduler: Linear
98
+ * Warmup steps: 500
99
+ * Training steps: 20000
100
+ * Train batch size: 32 (gradient accumulation 2 → effective batch size 64)
101
+ * Eval batch size: 16
102
+ * Seed: 42
103
+
104
+ ### Training results (summary)
105
+
106
+ | Training Loss | Epoch | Step | Validation Loss | WER |
 
 
 
107
  |:-------------:|:-----:|:-----:|:---------------:|:------:|
108
  | 0.0834 | 2.0 | 1000 | 0.1862 | 6.3852 |
109
  | 0.0871 | 4.0 | 2000 | 0.1777 | 5.9175 |
 
126
  | 0.0004 | 38.02 | 19000 | 0.2618 | 5.1361 |
127
  | 0.0004 | 40.02 | 20000 | 0.2663 | 5.1265 |
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
+ ## Example usage
141
+
142
+ ```python
143
+ from transformers import pipeline
144
+
145
+ hf_model = "HiTZ/whisper-large-es" # replace with actual repo ID
146
+ device = 0 # -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.