asierhv commited on
Commit
94dd903
·
verified ·
1 Parent(s): ead73eb

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.789654186910546
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 Catalan
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 ca dataset.
37
- It achieves the following results on the evaluation set:
38
- - Loss: 0.2782
39
- - Wer: 13.7897
 
 
 
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.0975 | 3.05 | 1000 | 0.3560 | 19.4421 |
72
  | 0.1381 | 7.04 | 2000 | 0.3066 | 16.1486 |
@@ -74,27 +122,57 @@ The following hyperparameters were used during training:
74
  | 0.1089 | 15.03 | 4000 | 0.2699 | 14.0726 |
75
  | 0.0505 | 19.03 | 5000 | 0.2782 | 13.7897 |
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.789654186910546
29
  ---
30
 
 
 
 
31
  # Whisper Base Catalan
32
 
33
+ ## Model summary
34
+
35
+ **Whisper Base Catalan** is an automatic speech recognition (ASR) model for **Catalan (ca)** speech. It is fine-tuned from [openai/whisper-base] on the **Catalan subset of Mozilla Common Voice 13.0**, achieving a **Word Error Rate (WER) of 13.79%** on the evaluation split.
36
+
37
+ This model is intended for higher-quality Catalan transcription compared to the tiny variant.
38
+
39
+ ---
40
 
41
  ## Model description
42
 
43
+ * **Architecture:** Transformer-based encoder–decoder (Whisper)
44
+ * **Base model:** openai/whisper-base
45
+ * **Language:** Catalan (ca)
46
+ * **Task:** Automatic Speech Recognition (ASR)
47
+ * **Output:** Text transcription in Catalan
48
+ * **Decoding:** Autoregressive sequence-to-sequence decoding
49
+
50
+ Fine-tuned to improve transcription accuracy on Catalan audio using Whisper’s pretrained multilingual knowledge.
51
 
52
+ ---
53
+
54
+ ## Intended use
55
+
56
+ ### Primary use cases
57
 
58
+ * Transcription of Catalan audio recordings with higher accuracy
59
+ * Research and development in Catalan ASR
60
+ * Media, educational, or accessibility applications
61
+
62
+ ### Out-of-scope use
63
+
64
+ * Real-time or low-latency transcription without optimization
65
+ * Speech translation
66
+ * Safety-critical applications without further validation
67
+
68
+ ---
69
+
70
+ ## Limitations and known issues
71
+
72
+ * Performance may degrade on:
73
+ * Noisy or low-quality recordings
74
+ * Conversational or spontaneous speech
75
+ * Regional dialects not well represented in Common Voice
76
+ * Dataset biases may influence output
77
+ * Occasional transcription errors on difficult audio
78
+
79
+ ---
80
 
81
  ## Training and evaluation data
82
 
83
+ * **Dataset:** Mozilla Common Voice 13.0 (Catalan subset)
84
+ * **Data type:** Crowd-sourced, read speech
85
+ * **Preprocessing:**
86
+ * Audio resampled to 16 kHz
87
+ * Text normalized using Whisper tokenizer
88
+ * Filtering of invalid or problematic samples
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.79%** |
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: 5,000
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.0975 | 3.05 | 1000 | 0.3560 | 19.4421 |
120
  | 0.1381 | 7.04 | 2000 | 0.3066 | 16.1486 |
 
122
  | 0.1089 | 15.03 | 4000 | 0.2699 | 14.0726 |
123
  | 0.0505 | 19.03 | 5000 | 0.2782 | 13.7897 |
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-ca" # 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.