Speech processing · Phoneme recognition · Full-stack

Automatic detection of French liaisons in read speech

A phoneme-level system that listens to a learner reading French aloud and tells whether each expected liaison was produced or omitted, with three applications built on top of it: an annotation and analysis platform, a pronunciation trainer, and a model comparison tool.

406k+annotations in the corpus
7.25%best phoneme error rate (WavLM)
3CTC models fine-tuned and compared
3applications, one Docker Compose stack

The problem

In French, a normally silent final consonant is sometimes pronounced when the next word starts with a vowel. This is a liaison. Some are required, some are optional, and some are forbidden. They are hard for children and second-language learners, and checking them by ear does not scale.

  • Liaisons are short, sub-word events: word-level ASR transcripts hide them.
  • The decision depends on context: grammar, word class and register.
  • Learners need precise, immediate feedback on each liaison, not a global score.
Example
les enfants arrivent
/lez‿ɑ̃fɑ̃ a.ʁiv/

The /z/ between les and enfants is a required liaison. If the reader says /le ɑ̃fɑ̃/, the system marks it as omitted.

VL = realised liaisonXL = omitted liaison

Detection pipeline

The system compares what the reader should say with what they actually said, at the level of phonemes.

01

Text

Sentence or paragraph shown to the reader.

02

Reference phonemes

eSpeak NG phonemization plus liaison rules give the expected sequence.

03

Audio → phonemes

A fine-tuned CTC model (WavLM) predicts the phonemes actually spoken.

04

Alignment

Reference and prediction are aligned around each liaison site.

05

Decision

Each liaison is labelled realised (VL) or omitted (XL), with feedback.

What the output looks like

Choose a reading to see how liaison sites are labelled after alignment.

Reference
Predicted
Feedback
Realised (VL)Omitted (XL)

Illustrative examples showing the output format. They are not recordings from the corpus.

Three applications, one stack

The model is used in three tools, each for a different user: researchers, learners and ML engineers.

LiaisonCheck

Annotation and analysis platform: browse the re-annotated corpus, analyse an audio file, inspect each liaison and benchmark models. Includes verified accounts, an activity log and team discussions.

ReactExpressPostgreSQLFFmpeg

Liaison et Moi

Pronunciation trainer: read a sentence, record yourself, get feedback on every liaison and follow your progress over time.

ReactNode.jsWavLMSQLite

Model comparator

Load a short WAV file and compare the phoneme predictions of two fine-tuned checkpoints side by side. Metrics history is stored for reproducibility.

PythonPyTorchTransformers

Model results

Three self-supervised speech models were fine-tuned with a CTC head for French phoneme recognition. Phoneme error rate (PER), lower is better.

ModelFirst run (3 epochs)Final runEpochsFinal PER
WavLM Base → Base Plus15.69%7.247%10
Wav2Vec2 Base14.02%7.813%10
HuBERT Base LS-96018.35%9.757%5.5

Bar length is relative to 10% PER. WavLM Base Plus was selected for audio feedback in the pronunciation trainer.

Architecture

A single Docker Compose stack runs the three applications and a landing page. Each service exposes its own port and shares the Python speech pipeline.

PythonPyTorchHugging FaceWavLMwav2vec2HuBERTeSpeak NGReactNode.jsExpressPostgreSQLSQLiteNginxFFmpegDocker ComposeWebRTC
Browser
├── :5173 → Nginx → React · Liaison et Moi
│                  └── /api → Node.js → exercises + SQLite
│                                      └── Python → eSpeak NG / WavLM
├── :5181 → Express → React · LiaisonCheck + /api
│                     ├── PostgreSQL : annotations, analyses, accounts
│                     └── FFmpeg → Python → CTC → liaison comparison
└── :7861 → Python comparator → WavLM checkpoints + SQLite metrics

My contribution

  • Fine-tuned and benchmarked WavLM, Wav2Vec2 and HuBERT for French phoneme recognition.
  • Designed the phonemization and alignment pipeline used for liaison decisions.
  • Built the three applications: frontend, APIs, databases and audio processing.
  • Packaged the whole system as a reproducible Docker Compose stack.

About the source code

This is a research project. The source code, the annotated corpus, the audio recordings and the trained checkpoints are private. This page presents the approach, the architecture and the results.