Automatic Speech Recognition
Transformers
Safetensors
Core ML
French
whisper
audio
asr
speech
french
fine-tuned
on-device
mobile
ios
vocaread
Eval Results (legacy)
Instructions to use eborges78/whisper-tiny-french with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use eborges78/whisper-tiny-french with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="eborges78/whisper-tiny-french")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("eborges78/whisper-tiny-french") model = AutoModelForSpeechSeq2Seq.from_pretrained("eborges78/whisper-tiny-french") - Notebooks
- Google Colab
- Kaggle
Add model card (was MODEL_CARD_TINY.md locally)
Browse files
README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: fr
|
| 3 |
+
license: mit
|
| 4 |
+
library_name: transformers
|
| 5 |
+
tags:
|
| 6 |
+
- whisper
|
| 7 |
+
- automatic-speech-recognition
|
| 8 |
+
- audio
|
| 9 |
+
- asr
|
| 10 |
+
- speech
|
| 11 |
+
- french
|
| 12 |
+
- fine-tuned
|
| 13 |
+
- on-device
|
| 14 |
+
- mobile
|
| 15 |
+
- coreml
|
| 16 |
+
- ios
|
| 17 |
+
- vocaread
|
| 18 |
+
datasets:
|
| 19 |
+
- facebook/multilingual_librispeech
|
| 20 |
+
metrics:
|
| 21 |
+
- wer
|
| 22 |
+
base_model: openai/whisper-tiny
|
| 23 |
+
model-index:
|
| 24 |
+
- name: whisper-tiny-french
|
| 25 |
+
results:
|
| 26 |
+
- task:
|
| 27 |
+
type: automatic-speech-recognition
|
| 28 |
+
name: Automatic Speech Recognition
|
| 29 |
+
dataset:
|
| 30 |
+
name: FLEURS-FR (golden subset, 50 clips)
|
| 31 |
+
type: google/fleurs
|
| 32 |
+
config: fr_fr
|
| 33 |
+
split: test
|
| 34 |
+
metrics:
|
| 35 |
+
- type: wer
|
| 36 |
+
value: 0.4296
|
| 37 |
+
name: Test WER
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
# whisper-tiny-french
|
| 41 |
+
|
| 42 |
+
French-only fine-tune of [openai/whisper-tiny](https://huggingface.co/openai/whisper-tiny), built to validate on-device TTS output inside [VocaRead](https://github.com/eborges78/vocaread). 39 M parameters, all of them dedicated to French.
|
| 43 |
+
|
| 44 |
+
This is the **PyTorch checkpoint**. For the **iOS-ready CoreML INT8 bundle** see [`eborges78/whisper-tiny-fr-coreml-slim`](https://huggingface.co/eborges78/whisper-tiny-fr-coreml-slim).
|
| 45 |
+
|
| 46 |
+
## Why this exists
|
| 47 |
+
|
| 48 |
+
`openai/whisper-tiny` is the only Whisper size that fits in RAM on iPad 6 / iPhone 8 / SE2. But its 39 M parameters span 99 languages — French gets a fraction of that capacity, and the WER on Common Voice FR sits around 50 %.
|
| 49 |
+
|
| 50 |
+
A French-only fine-tune of the same architecture concentrates 100 % of the capacity on FR and pushes WER under 20 %, all while staying inside the same memory envelope. Drop-in replacement for the multilingual tiny when the input language is known.
|
| 51 |
+
|
| 52 |
+
## Quick start
|
| 53 |
+
|
| 54 |
+
```python
|
| 55 |
+
import torch
|
| 56 |
+
from transformers import pipeline
|
| 57 |
+
|
| 58 |
+
asr = pipeline(
|
| 59 |
+
"automatic-speech-recognition",
|
| 60 |
+
model="eborges78/whisper-tiny-french",
|
| 61 |
+
chunk_length_s=30,
|
| 62 |
+
generate_kwargs={"language": "fr", "task": "transcribe"},
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
transcript = asr("path/to/french-audio.wav")
|
| 66 |
+
print(transcript["text"])
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## Performance
|
| 70 |
+
|
| 71 |
+
Measured on a 50-clip golden subset of FLEURS-FR (`google/fleurs`, config `fr_fr`, split `test`). WER computed with jiwer + Whisper-style normalization (lowercase, strip punctuation, collapse whitespace).
|
| 72 |
+
|
| 73 |
+
| Model | Params | WER (FR) | Δ vs baseline |
|
| 74 |
+
|---|---|---|---|
|
| 75 |
+
| `openai/whisper-tiny` (multilingual) | 39 M | ~50 % | baseline |
|
| 76 |
+
| **`eborges78/whisper-tiny-french`** (this model) | 39 M | **43 %** (measured) | **−7 pts** |
|
| 77 |
+
| `openai/whisper-base` (multilingual) | 74 M | ~25 % | for comparison |
|
| 78 |
+
| `eborges78/whisper-base-french` (planned) | 74 M | ~8-10 % | sister model |
|
| 79 |
+
|
| 80 |
+
> **Honest assessment** : the FLEURS WER of 43 % is **above the original 20 % quality gate target** documented in [`configs/tiny-fr.yaml`](https://github.com/eborges78/whisper-fr-coreml-slim/blob/main/configs/tiny-fr.yaml). The model trained for 4 epochs on 30 h of MLS-FR but FLEURS is a substantially harder out-of-distribution eval (news/short prompts with English loanwords like "springboks", "u.s. corps of engineers" vs MLS's 19th-century French audiobooks).
|
| 81 |
+
>
|
| 82 |
+
> Internal eval on **300 MLS-FR test clips** (in-distribution) lands at **WER 32 %** — closer to but still above target. The model is published under the `dev` branch revision rather than `main` to flag this gap.
|
| 83 |
+
>
|
| 84 |
+
> **For the target VocaRead use case** (validating clean French TTS output of public-domain literature), the in-distribution performance is what matters — and the model improves noticeably over the multilingual tiny baseline (which hallucinates English phrases on FR audio).
|
| 85 |
+
|
| 86 |
+
### Per-clip behaviour examples (from the 50-clip FLEURS golden set)
|
| 87 |
+
|
| 88 |
+
**Best cases** (clean French, no loanwords, WER 7-11 %) :
|
| 89 |
+
```
|
| 90 |
+
REF: ainsi le crayon était un bon ami pour beaucoup de gens lorsqu'il est sorti
|
| 91 |
+
HYP: si le crayon était un bon ami pour beaucoup de gens lorsqu'il est sorti
|
| 92 |
+
WER: 0.07
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
**Worst cases** (English loanwords + proper nouns, WER > 80 %) :
|
| 96 |
+
```
|
| 97 |
+
REF: pour les springboks ce fut la fin d'une série de cinq défaites
|
| 98 |
+
HYP: pour l'esprit de boxe se fût la fin d'une cerine de sang du défaite
|
| 99 |
+
WER: 0.75
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
The model maps unseen English words phonetically — expected since MLS is a 19th-century French literature corpus.
|
| 103 |
+
|
| 104 |
+
## Training
|
| 105 |
+
|
| 106 |
+
| Item | Value |
|
| 107 |
+
|---|---|
|
| 108 |
+
| Base model | `openai/whisper-tiny` |
|
| 109 |
+
| Fine-tune corpus | `facebook/multilingual_librispeech`, config `french`, split `train` |
|
| 110 |
+
| Training hours used | 30 h (~9 000 clips, capped) |
|
| 111 |
+
| Epochs | 4 |
|
| 112 |
+
| Steps | 1 128 |
|
| 113 |
+
| Batch size | 32 |
|
| 114 |
+
| Learning rate | 1.0e-5, linear, 500 warmup steps |
|
| 115 |
+
| Hardware | 1× RTX 3090 24 GB (Vast.ai) |
|
| 116 |
+
| Wall-clock | ~6 h total (4h29 dataset mel-mapping CPU, 1h26 training GPU) |
|
| 117 |
+
| Cost | ~€2 actual (single-instance, sub-optimal — see repo `docs/adding-a-language.md` for the CPU+GPU split that saves ~50 %) |
|
| 118 |
+
| In-training eval | MLS test (capped 300 clips) every 500 steps |
|
| 119 |
+
| Final training loss | 0.44 (started at 1.32) |
|
| 120 |
+
| In-training eval WER (MLS test) | **31.96 %** |
|
| 121 |
+
| FLEURS-FR bench WER (50 clips) | **42.96 %** |
|
| 122 |
+
|
| 123 |
+
Training pipeline and full reproduction recipe : [github.com/eborges78/whisper-fr-coreml-slim](https://github.com/eborges78/whisper-fr-coreml-slim).
|
| 124 |
+
|
| 125 |
+
### Known training limitations
|
| 126 |
+
|
| 127 |
+
- **4 epochs probably insufficient.** Training loss was still descending in epoch 4 (0.50 → 0.44). A retraining at 8-10 epochs would likely move WER lower.
|
| 128 |
+
- **MLS-only corpus.** Adding FLEURS train data, VoxPopuli FR, or a custom news corpus to the training mix would help bridge the FLEURS eval gap.
|
| 129 |
+
- **No FR-specific augmentation.** Current `spec_augment` is conservative (`time_mask_param: 30, freq_mask_param: 27`). More aggressive masking might help.
|
| 130 |
+
|
| 131 |
+
## Limitations
|
| 132 |
+
|
| 133 |
+
This model is calibrated for the specific downstream task of **validating TTS output read-aloud audio**. It will work but is sub-optimal for :
|
| 134 |
+
|
| 135 |
+
- **Far-field noisy speech** : trained on clean audiobook reads, will degrade on phone-call quality audio. Use whisper-base-french or whisper-small-french for noisier inputs.
|
| 136 |
+
- **Code-switching** : capacity is 100 % FR. Sentences mixing French and English will be transcribed entirely in French (the English chunks get phonetically mapped). For mixed-language input, stay on multilingual whisper-base or larger.
|
| 137 |
+
- **Strong regional accents** : MLS speakers are mostly metropolitan / continental French. Quebec or West African French may have higher WER. We did not specifically evaluate this.
|
| 138 |
+
- **Hallucination at the edges** : like all Whisper sizes, the model can hallucinate on silence-only inputs (it generates audiobook-style filler). Always pair with a VAD or duration check upstream.
|
| 139 |
+
- **Single-language only** : forced to FR via `generate_kwargs={"language": "fr"}`. Passing other languages will produce garbage — use the multilingual base if you don't know the language ahead of time.
|
| 140 |
+
|
| 141 |
+
## License
|
| 142 |
+
|
| 143 |
+
MIT. This model is a derivative of `openai/whisper-tiny` (MIT) trained on Multilingual LibriSpeech (CC-BY-4.0). Both upstream licenses allow commercial use ; this fine-tune adds no additional restrictions.
|
| 144 |
+
|
| 145 |
+
## Citation
|
| 146 |
+
|
| 147 |
+
If you use this model in a paper or product, please cite the upstream Whisper paper and the MLS dataset :
|
| 148 |
+
|
| 149 |
+
```bibtex
|
| 150 |
+
@misc{radford2022whisper,
|
| 151 |
+
title = {Robust Speech Recognition via Large-Scale Weak Supervision},
|
| 152 |
+
author = {Alec Radford and Jong Wook Kim and Tao Xu and Greg Brockman and Christine McLeavey and Ilya Sutskever},
|
| 153 |
+
year = {2022},
|
| 154 |
+
eprint = {2212.04356},
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
@inproceedings{pratap2020mls,
|
| 158 |
+
title = {{MLS}: A Large-Scale Multilingual Dataset for Speech Research},
|
| 159 |
+
author = {Pratap, Vineel and Xu, Qiantong and Sriram, Anuroop and Synnaeve, Gabriel and Collobert, Ronan},
|
| 160 |
+
booktitle = {Interspeech},
|
| 161 |
+
year = {2020},
|
| 162 |
+
}
|
| 163 |
+
```
|
| 164 |
+
|
| 165 |
+
## Acknowledgments
|
| 166 |
+
|
| 167 |
+
- [Bofeng Huang](https://huggingface.co/bofenghuang) for the [`whisper-medium-fr` fine-tuning recipe](https://medium.com/@bofenghuang7/what-i-learned-from-whisper-fine-tuning-event-2a68dab1862) scaled down here to the `tiny` envelope.
|
| 168 |
+
- [Argmax](https://argmaxinc.com/) for [WhisperKit](https://github.com/argmaxinc/WhisperKit) — without their slim CoreML bundles + ANE optimization, this wouldn't fit on an iPad 6 at all.
|