Once the dataset is established and the “Ground Truth” set, the next step is to train and refine (finetune) artificial intelligence models capable of segmenting the radio stream with surgical precision. This R&D process explored several architectures, ranging from pure audio signal processing to semantic textual analysis.
Finetuning involves taking a model pre-trained on vast volumes of data (such as CamemBERT for text or Wav2Vec2 for audio) and specifically adapting it to the characteristics of a radio broadcast (jingles, speech rate, typical transitions).
Two major axes were explored:
Switching from a “generic” model (which understands language or sound) to an “expert” model (which recognizes your radio segments) relies on a precise industrial pipeline.

The project relies on the Hugging Face ecosystem via the transformers library. It provides specialized classes such as CamembertForSequenceClassification.
Under the hood, PyTorch, the tensor calculation framework, handles the millions of matrix multiplications required. It transforms text into numerical tokens (unique identifiers for each piece of a word) so that the AI can “calculate” meaning rather than “reading” it.
Technically, finetuning consists of keeping the body of the pre-trained model (which already possesses encyclopedic knowledge) and replacing its output layer with a blank classification head. This new layer is specifically sized for our task (e.g., 2 outputs for a binary classification: “Chronicle” vs. “Other”).
A golden rule: labeling is always done BEFORE training. This is the creation phase of the Ground Truth. We prepare files where each sequence of tokens is associated with its answer:
Once the data is ready, the model enters a training loop repeated several times (epochs):
For text-based detection, we used CamemBERT, a transformer model specialized in the French language.
An isolated 2-second segment (“It is 8:12”) is often insufficient to identify a chronicle. We implemented a sliding window technique:
To go further, a three-stage architecture was tested:
In parallel with the text, audio provides valuable clues, especially musical jingles that transcription ignores.
The finetuning of state-of-the-art models was experimented with:
One of the most robust methods involves using a lightweight model specialized only in detecting intro jingles. Once the jingle is detected with high confidence, the system “anchors” the start of the chronicle and switches to a speech tracking model to determine its end.
AI models can sometimes hesitate (oscillating between “chronicle” and “non-chronicle”). To stabilize detection in real conditions, several post-processing techniques have been developed:
Each training is monitored via Weights & Biases (WandB) to track the evolution of metrics (Loss, F1-Score) and stored on Hugging Face for deployment. Although local finetuning approaches showed promising results, it is the semantic intelligence of LLMs (DeepSeek/Claude) that ultimately offered the best robustness for the current production solution.
Technical details of the training are available in the article dedicated to audio and the one dedicated to text.