Why a v2
This version fixes the absence of the voiced labial-palatal approximant
ɥ. The original
Cnam-LMSSC/wav2vec2-french-phonemizer never transcribes the pronunciation of the voiced labial–palatal approximant with /ɥ/ and instead incorrectly replaces it with the sequence /yi/.
This created issues for phonetic accuracy and linguistic analysis. Words like "nuit" or "huit" are pronounced with \ɥ\ and not with \yi\
For Text-to-Speech (TTS) task, substituting \ɥ\ with \yi\ results in unnatural prosody.
Fine-tuned French Voxpopuli v2 wav2vec2-base model for speech-to-phoneme task in French
Fine-tuned
facebook/wav2vec2-base-fr-voxpopuli-v2 for
French speech-to-phoneme (without language model) using the train and validation splits of
Common Voice v13.
Audio samplerate for usage
When using this model, make sure that your speech input is sampled at 16kHz.
Output
As this model is specifically trained for a speech-to-phoneme task, the output is sequence of
IPA-encoded words, without punctuation.
If you don't read the phonetic alphabet fluently, you can use this excellent
IPA reader website to convert the transcript back to audio synthetic speech in order to check the quality of the phonetic transcription.
Training procedure
The model has been finetuned on Commonvoice-v13 (FR) for 14 epochs on a 1xADA_6000 GPU at Cnam/LMSSC using a ddp strategy and gradient-accumulation procedure (256 audios per update, corresponding roughly to 25 minutes of speech per update -> 2k updates per epoch)
-
Learning rate schedule : Double Tri-state schedule
- Warmup from 1e-5 for 7% of total updates
- Constant at 1e-4 for 28% of total updates
- Linear decrease to 1e-6 for 36% of total updates
- Second warmup boost to 3e-5 for 3% of total updates
- Constant at 3e-5 for 12% of total updates
- Linear decrease to 1e-7 for remaining 14% of updates
-
The set of hyperparameters used for training are the same as those detailed in Annex B and Table 6 of
wav2vec2 paper.
Usage (using the online Inference API)
Just record your voice on the ⚡ Inference API on this webpage, and then click on "Compute", that's all !
Usage (with HuggingSound library)
The model can be used directly using the
HuggingSound library:
1import pandas as pd
2from huggingsound import SpeechRecognitionModel
3
4model = SpeechRecognitionModel("Cnam-LMSSC/wav2vec2-french-phonemizer-v2")
5audio_paths = ["./test_relecture_texte.wav", "./10179_11051_000021.flac"]
6
7# No need for the Audio files to be sampled at 16 kHz here,
8# they are automatically resampled by Huggingsound
9
10transcriptions = model.transcribe(audio_paths)
11
12# (Optionnal) Display results in a table :
13## transcriptions is list of dicts also containing timestamps and probabilities !
14
15df = pd.DataFrame(transcriptions)
16df['Audio file'] = pd.DataFrame(audio_paths)
17df.set_index('Audio file', inplace=True)
18df[['transcription']]
Output :
| Audio file | Phonetic transcription (IPA) |
|---|
| ./test_relecture_texte.wav | ʃapitʁ di də abɛse pəti kɔ̃t də ʒyl ləmɛtʁ ɑ̃ʁʒistʁe puʁ libʁivɔksɔʁɡ ibis dɑ̃ la bas kuʁ dœ̃ ʃato sə tʁuva paʁmi tut sɔʁt də volaj œ̃n ibis ʁɔz |
| ./10179_11051_000021.flac | kɛl dɔmaʒ kə sə nə swa pa dy sykʁ supiʁa se foʁaz ɑ̃ pasɑ̃ sa lɑ̃ɡ syʁ la vitʁ fɛ̃ dy ʃapitʁ kɛ̃z ɑ̃ʁʒistʁe paʁ sonjɛ̃ sɛt ɑ̃ʁʒistʁəmɑ̃ fɛ paʁti dy domɛn pyblik |
Inference script (if you do not want to use the huggingsound library) :
1import torch
2from transformers import AutoModelForCTC, Wav2Vec2Processor
3from datasets import load_dataset
4import soundfile as sf # Or Librosa if you prefer to ...
5
6MODEL_ID = "Cnam-LMSSC/wav2vec2-french-phonemizer-v2"
7
8model = AutoModelForCTC.from_pretrained(MODEL_ID)
9processor = Wav2Vec2Processor.from_pretrained(MODEL_ID)
10
11audio = sf.read('example.wav')
12# Make sure you have a 16 kHz sampled audio file, or resample it !
13
14inputs = processor(np.array(audio[0]),sampling_rate=16_000., return_tensors="pt")
15
16with torch.no_grad():
17 logits = model(**inputs).logits
18
19predicted_ids = torch.argmax(logits,dim = -1)
20transcription = processor.batch_decode(predicted_ids)
21
22print("Phonetic transcription : ", transcription)
Output :
'ʒə syi tʁɛ kɔ̃tɑ̃ də vu pʁezɑ̃te notʁ solysjɔ̃ puʁ fonomize dez odjo fasilmɑ̃ sa fɔ̃ksjɔn kɑ̃ mɛm tʁɛ bjɛ̃'
Test Results:
In the table below, we report the Phoneme Error Rate (PER) of the model on both Common Voice and Multilingual Librispeech (using the French configs for both datasets of course), when finetuned on Common Voice train set only :
| Model | Test Set | PER |
|---|
| Cnam-LMSSC/wav2vec2-french-phonemizer-v2 | Common Voice v13 (French) | 4.75% |
| Cnam-LMSSC/wav2vec2-french-phonemizer-v2 | Multilingual Librispeech (French) | 5.97% |
Citation
If you use this finetuned model for any publication, please use this to cite our work :
1@misc {lmssc-wav2vec2-base-phonemizer-french-v2_2026,
2 author = { Olivier, Malo },
3 title = { wav2vec2-french-phonemizer-v2 (Revision 8e71385) },
4 year = 2026,
5 url = { https://huggingface.co/Cnam-LMSSC/wav2vec2-french-phonemizer-v2 },
6 doi = { 10.57967/hf/7468 },
7 publisher = { Hugging Face }
8}