whisper-large-v2-es / README.md
asierhv's picture
added description and "how to use" example
d745e38 verified
---
language:
- es
license: apache-2.0
base_model: openai/whisper-large-v2
tags:
- whisper-event
- generated_from_trainer
datasets:
- mozilla-foundation/common_voice_13_0
metrics:
- wer
model-index:
- name: Whisper Large-V2 Spanish
results:
- task:
name: Automatic Speech Recognition
type: automatic-speech-recognition
dataset:
name: mozilla-foundation/common_voice_13_0 es
type: mozilla-foundation/common_voice_13_0
config: es
split: test
args: es
metrics:
- name: Wer
type: wer
value: 4.89488506963824
---
# Whisper Large-V2 Spanish
## Model summary
**Whisper Large-V2 Spanish** is a state-of-the-art automatic speech recognition (ASR) model for **Spanish (es)**, fine-tuned from [openai/whisper-large-v2] on the **Spanish subset of Mozilla Common Voice 13.0**. It achieves a **Word Error Rate (WER) of 4.8949%** on the evaluation set.
This model is optimized for applications that demand **very high transcription accuracy** while benefiting from improvements in Large-V2 architecture over the original Large model.
---
## Model description
* **Architecture:** Transformer-based encoder–decoder (Whisper Large-V2)
* **Base model:** openai/whisper-large-v2
* **Language:** Spanish (es)
* **Task:** Automatic Speech Recognition (ASR)
* **Output:** Text transcription in Spanish
* **Decoding:** Autoregressive sequence-to-sequence decoding
Large-V2 introduces enhanced pretraining for multilingual and robust speech recognition, yielding lower WERs than Large in most languages.
---
## Intended use
### Primary use cases
* High-accuracy Spanish speech transcription
* Long-form audio content like podcasts, interviews, or lectures
* ASR research and benchmarking in Spanish
### Limitations
* Performance may degrade on highly noisy audio, heavy regional accents, or spontaneous speech
* High computational cost for real-time inference
* Not validated for legal, medical, or safety-critical transcription without human review
---
## Training and evaluation data
* **Dataset:** Mozilla Common Voice 13.0 (Spanish subset)
* **Data type:** Crowd-sourced read speech
* **Preprocessing:**
* Audio resampled to 16 kHz
* Text tokenized using Whisper tokenizer
* Removal of invalid or corrupted samples
* **Evaluation metric:** Word Error Rate (WER) on held-out evaluation set
---
## Evaluation results
| Metric | Value |
| ---------- | ---------- |
| WER (eval) | **4.8949%** |
---
## Training procedure
### Training hyperparameters
* Learning rate: 1e-5
* Optimizer: Adam (β1=0.9, β2=0.999, ε=1e-8)
* LR scheduler: Linear
* Warmup steps: 500
* Training steps: 20000
* Train batch size: 32 (gradient accumulation 2 → effective batch size 64)
* Eval batch size: 16
* Seed: 42
### Training results (summary)
| Training Loss | Epoch | Step | Validation Loss | WER |
|:-------------:|:-----:|:-----:|:---------------:|:------:|
| 0.0869 | 2.0 | 1000 | 0.1754 | 6.1516 |
| 0.0913 | 4.0 | 2000 | 0.1652 | 5.7500 |
| 0.051 | 6.0 | 3000 | 0.1643 | 5.7757 |
| 0.0391 | 8.0 | 4000 | 0.1881 | 5.6589 |
| 0.0104 | 10.0 | 5000 | 0.2026 | 5.6211 |
| 0.0806 | 12.01 | 6000 | 0.1741 | 5.7398 |
| 0.0077 | 14.01 | 7000 | 0.2119 | 5.6038 |
| 0.0357 | 16.01 | 8000 | 0.1776 | 5.6147 |
| 0.1087 | 18.01 | 9000 | 0.1868 | 5.5172 |
| 0.0401 | 20.01 | 10000 | 0.2014 | 5.4428 |
| 0.0334 | 22.01 | 11000 | 0.1751 | 5.2824 |
| 0.0071 | 24.01 | 12000 | 0.2295 | 5.2490 |
| 0.0374 | 26.01 | 13000 | 0.2098 | 5.2574 |
| 0.0023 | 28.01 | 14000 | 0.2498 | 5.0418 |
| 0.0025 | 30.01 | 15000 | 0.2311 | 4.9385 |
| 0.0006 | 32.01 | 16000 | 0.2544 | 4.8949 |
| 0.0009 | 34.02 | 17000 | 0.2691 | 5.1246 |
| 0.003 | 36.02 | 18000 | 0.2249 | 5.0277 |
| 0.0009 | 38.02 | 19000 | 0.2603 | 5.0373 |
| 0.0008 | 40.02 | 20000 | 0.2657 | 5.0225 |
---
## Framework versions
- Transformers 4.33.0.dev0
- PyTorch 2.0.1+cu117
- Datasets 2.14.4
- Tokenizers 0.13.3
---
## Example usage
```python
from transformers import pipeline
hf_model = "HiTZ/whisper-large-v2-es" # replace with actual repo ID
device = 0 # -1 for CPU
pipe = pipeline(
task="automatic-speech-recognition",
model=hf_model,
device=device
)
result = pipe("audio.wav")
print(result["text"])
```
---
## Ethical considerations and risks
* This model transcribes speech and may process personal data.
* Users should ensure compliance with applicable data protection laws (e.g., GDPR).
* The model should not be used for surveillance or non-consensual audio processing.
---
## Citation
If you use this model in your research, please cite:
```bibtex
@misc{dezuazo2025whisperlmimprovingasrmodels,
title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
year={2025},
eprint={2503.23542},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
```
Please, check the related paper preprint in
[arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
for more details.
---
## License
This model is available under the
[Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
You are free to use, modify, and distribute this model as long as you credit
the original creators.
---
## Contact and attribution
* Fine-tuning and evaluation: HiTZ/Aholab - Basque Center for Language Technology
* Base model: OpenAI Whisper
* Dataset: Mozilla Common Voice
For questions or issues, please open an issue in the model repository.