asierhv commited on
Commit
d0e73c9
·
verified ·
1 Parent(s): 5cd9a53

added description and "how to use" example

Browse files
Files changed (1) hide show
  1. README.md +128 -37
README.md CHANGED
@@ -28,45 +28,93 @@ model-index:
28
  value: 19.59044631343944
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 Tiny Spanish
35
 
36
- This model is a fine-tuned version of [openai/whisper-tiny](https://huggingface.co/openai/whisper-tiny) on the mozilla-foundation/common_voice_13_0 es dataset.
37
- It achieves the following results on the evaluation set:
38
- - Loss: 0.4218
39
- - Wer: 19.5904
 
 
 
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: 3.75e-05
59
- - train_batch_size: 256
60
- - eval_batch_size: 128
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.1801 | 8.0 | 1000 | 0.4318 | 22.1861 |
72
  | 0.1627 | 16.01 | 2000 | 0.4218 | 19.5904 |
@@ -74,27 +122,58 @@ The following hyperparameters were used during training:
74
  | 0.0124 | 32.01 | 4000 | 0.4635 | 20.0459 |
75
  | 0.0129 | 40.02 | 5000 | 0.4568 | 20.4135 |
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 +181,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: 19.59044631343944
29
  ---
30
 
 
 
 
31
  # Whisper Tiny Spanish
32
 
33
+ ## Model summary
34
+
35
+ **Whisper Tiny Spanish** is an automatic speech recognition (ASR) model for **Spanish (es)** speech. It is fine-tuned from [openai/whisper-tiny] on the **Spanish subset of Mozilla Common Voice 13.0**, achieving a **Word Error Rate (WER) of 19.5904%** on the evaluation split.
36
+
37
+ This variant is optimized for low-latency and lightweight ASR applications on Spanish audio.
38
+
39
+ ---
40
 
41
  ## Model description
42
 
43
+ * **Architecture:** Transformer-based encoder–decoder (Whisper Tiny)
44
+ * **Base model:** openai/whisper-tiny
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 to improve transcription quality while maintaining a small model footprint.
51
+
52
+ ---
53
+
54
+ ## Intended use
55
+
56
+ ### Primary use cases
57
+
58
+ * Lightweight Spanish speech transcription
59
+ * Research and experimentation with Spanish ASR
60
+ * Applications on devices with limited compute resources
61
+
62
+ ### Out-of-scope use
63
 
64
+ * High-accuracy or professional transcription (WER ~20%)
65
+ * Real-time transcription without latency optimization
66
+ * Safety-critical applications
67
 
68
+ ---
69
+
70
+ ## Limitations and known issues
71
+
72
+ * Performance may be limited on:
73
+ * Noisy recordings or overlapping speech
74
+ * Rapid or conversational Spanish
75
+ * Regional dialects not well-represented in Common Voice
76
+
77
+ * Occasional errors due to small model capacity and low parameter count.
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) | **19.5904%** |
99
+
100
+ ---
101
 
102
  ## Training procedure
103
 
104
  ### Training hyperparameters
105
 
106
+ * Learning rate: 3.75e-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: 256
112
+ * Eval batch size: 128
113
+ * Seed: 42
 
114
 
115
+ ### Training results (summary)
116
 
117
+ | Training Loss | Epoch | Step | Validation Loss | WER |
118
  |:-------------:|:-----:|:----:|:---------------:|:-------:|
119
  | 0.1801 | 8.0 | 1000 | 0.4318 | 22.1861 |
120
  | 0.1627 | 16.01 | 2000 | 0.4218 | 19.5904 |
 
122
  | 0.0124 | 32.01 | 4000 | 0.4635 | 20.0459 |
123
  | 0.0129 | 40.02 | 5000 | 0.4568 | 20.4135 |
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-tiny-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
 
157
+ ## Ethical considerations and risks
158
 
159
+ * This model transcribes speech and may process personal data.
160
+ * Users should ensure compliance with applicable data protection laws (e.g., GDPR).
161
+ * The model should not be used for surveillance or non-consensual audio processing.
162
+
163
+ ---
164
 
165
  ## Citation
166
 
167
+ If you use this model in your research, please cite:
168
 
169
  ```bibtex
170
  @misc{dezuazo2025whisperlmimprovingasrmodels,
171
+ title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
172
+ author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
173
+ year={2025},
174
+ eprint={2503.23542},
175
+ archivePrefix={arXiv},
176
+ primaryClass={cs.CL}
 
177
  }
178
  ```
179
 
 
181
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
182
  for more details.
183
 
184
+ ---
185
+
186
+ ## License
187
 
188
  This model is available under the
189
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
190
  You are free to use, modify, and distribute this model as long as you credit
191
+ the original creators.
192
+
193
+ ---
194
+
195
+ ## Contact and attribution
196
+
197
+ * Fine-tuning and evaluation: HiTZ/Aholab - Basque Center for Language Technology
198
+ * Base model: OpenAI Whisper
199
+ * Dataset: Mozilla Common Voice
200
+
201
+ For questions or issues, please open an issue in the model repository.