This article traces the technical evolution and the steps followed to train models capable of automatically detecting radio chronicles within a full broadcast.
This approach involves using Machine Learning techniques by segmenting long audio files, extracting acoustic features, and training a classifier to identify areas of interest.
In this new approach, we train a model with:
The default model used is a Random Forest.
Instead of entrusting the decision to a single algorithm, the Random Forest creates a hundred Decision Trees (hence the name “Forest”).
To ensure that the trees are not all identical, randomness is introduced in two ways:

For each 3-second segment, the system extracts a rich acoustic signature:
The model scores 7.69/100 (which is not sufficient), so we switch methods to start from a pre-trained model (to benefit from a model trained on a much larger dataset).
This approach involves fine-tuning (taking a model already trained on a large volume of data and continuing to train it on a more specific dataset) a wav2vec2-large-xlsr-53-french model for audio segment classification (radio chronicle detection) and performing predictions on new audio files.
Training
Wav2Vec2ForSequenceClassification model transforms an audio signal into a sequence of numerical vectors that capture rich sound representations. We then add a layer (classification head) that takes these representations and transforms them into a score per possible category (chronicle or background).Prediction
To try to correctly detect the chronicles, the values of the following parameters were modified:
Even when adjusting these various parameters, no satisfactory results were obtained during inference.
One of the issues causing chronicles to not be detected correctly is the imbalance in the dataset: there are many more “chronicles” than “background” in a radio broadcast, which creates false positives.
The most precise method is the percentage lever. The script generates the data and then performs an automatic downsampling to reach the exact requested ratio.
To simplify and improve chronicle detection, we ask the model to detect only the periods where there are chronicles (without naming them).
After applying all these techniques, we obtain a score of 38.09, which is also not sufficient.
The original inference script took independent decisions per time window. If a single window in the middle of a chronicle got a confidence score slightly below the threshold, the chronicle was cut in two or ignored.
A. Smoothing by Competitive Score (Soft Voting)
Instead of simply taking the probability of the “chronicle” class, the script calculates a weighted score:
prob_chronique > prob_background, the score is equal to prob_chronique.prob_background >= prob_chronique, the chronicle score is divided by two.B. Hysteresis Thresholding (Double Threshold)
Using a single threshold creates oscillations. We now use two thresholds:
threshold_start): A high score (0.7) is required to trigger the start of a chronicle.threshold_end): A lower score (0.3) is sufficient to continue detection.
Unfortunately, the final score of the model is 8.6/100, or insufficient.
This simplified version focuses solely on temporal smoothing via a moving average to stabilize detections without using the complexity of hysteresis or competitive scoring.
In classic prediction, each window is treated independently. If the model has a micro-hesitation, the chronicle is cut.
The smooth approach works like this:
The score obtained by this method is 0.0/100.
This approach aims to solve precision problems at the start of a chronicle by using introductory jingles as high-confidence anchor points.
Rather than trying to classify each 10-second segment as “chronicle” or “background” with a single model, which often creates ambiguities at the boundaries, the hybrid approach divides the problem into two steps:
The training script creates a binary model (Jingle vs. Background) optimized for acoustic signatures.
Sampling Logic
Uses AST (Audio Spectrogram Transformer) (MIT/ast-finetuned-audioset), because its ability to analyze audio as an image (via spectrograms) is superior for recognizing repetitive musical patterns like jingles.
This script combines both models for precise segmentation.

The score obtained by this method is 0.0/100.
Although the facebook/wav2vec2-large-xlsr-53-french model is excellent for Automatic Speech Recognition (ASR), it has limitations for segment classification:
large version (300M+ parameters) is heavy for simple binary or multi-class classification. This slows down inference and requires more data to avoid overfitting.Inferences
Chronicle timecodes (without naming them)
Description: Converts audio into a spectrogram (image) and uses a Transformer (ViT) for analysis.
Advantages: Excellent for capturing acoustic signatures and jingles.
Model used: MIT/ast-finetuned-audioset-10-10-0.4593
Observations and Results
Model score: 2.9/100
Description: One of the models for general sound classification.
Advantages: Trained to capture both speech and environmental/musical sounds. Very robust to noise and sound mixtures.
Model used: microsoft/beats-base
Observations and Results
Model score: 2.9/100
Given that the inference function has several parameters, we use a program that takes an audio and the actual location of chronicles in that audio and tests all combinations of parameter values to obtain this result, in order to know the optimal parameter configuration.
Unfortunately, no model has managed to obtain a result with the actual chronicle locations.

A “multi-modal” approach is used to detect the start of radio chronicles in real-time. Instead of relying on a single criterion, it merges several types of analyses to make a more robust decision.
Here are the main steps of the method:
1. Capture and Preprocessing
The system retrieves the audio stream (either from a file or a live stream like France Inter) and cuts it into small segments (chunks) to analyze them on the fly.
2. The “Fast Path” (Acoustic Fingerprinting)
Before launching heavy computations, the system checks if the audio segment resembles a known jingle.
3. Parallel Sensors (Multi-Approach)
If it’s not a known jingle, it activates 4 different sensors:
4. Score Fusion
Each sensor gives a score. The system makes a weighted average:
5. Learning (Feedback Loop)
As soon as a chronicle is detected with certainty, the system records the sound fingerprint of that moment. If it was a jingle, it will recognize it even faster next time thanks to the Fast Path.