Automatic Speech Recognition
Transformers
Safetensors
whisper
asr
french
speech-recognition
stt
multilingual
research
baseline
Instructions to use MEscriva/gilbert-fr-source with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MEscriva/gilbert-fr-source with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="MEscriva/gilbert-fr-source")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("MEscriva/gilbert-fr-source") model = AutoModelForSpeechSeq2Seq.from_pretrained("MEscriva/gilbert-fr-source", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Ajout du modèle bofenghuang/whisper-large-v3-french
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195---license: mitdatasets:- google/fleurs- facebook/voxpopuli- facebook/multilingual_librispeech- mozilla-foundation/common_voice_13_0- mozilla-foundation/common_voice_17_0language:- fr- enmetrics:- werbase_model:- openai/whisper-large-v3pipeline_tag: automatic-speech-recognitionlibrary_name: transformerstags:- speech-recognition- whisper- french- stt- multilingual- research- gilbert---# Gilbert-FR-Source — Research Baseline for French Automatic Speech Recognition`Gilbert-FR-Source` is a French automatic speech recognition (ASR) model used as the **research foundation** for the Gilbert project.It is designed as an internal scientific baseline enabling controlled experimentation, reproducible evaluation, and rigorous comparison across ASR architectures, datasets, and adaptation methods.This model is not a fine-tuned derivative, but a **curated research anchor** used to support systematic studies in:- domain adaptation,- robustness to spontaneous and long-form speech,- accented and low-resource linguistic profiles,- telephony and bandwidth-constrained speech,- multi-speaker and meeting transcription.---## 1. Research MotivationThe Gilbert project aims to build highly specialized ASR systems optimized for:- professional meeting transcription (hybrid/remote),- long-form multi-speaker discourse,- institutional environments (education, public sector),- constrained audio conditions (telephony, VoIP, low SNR),- sociolinguistic diversity (African, Canadian, Belgian and other French accents).While Whisper Large V3 provides strong baseline performance, its behavior under domain shifts (spontaneous interactions, overlapping speech, degraded microphones) requires systematic study.`Gilbert-FR-Source` provides the **frozen starting point** for this line of research, ensuring controlled comparisons between experiments.---## 2. Scientific Goals and Research QuestionsThis model is used to answer a series of research questions:### **Q1. Long-form modeling**How does Whisper-L3 behave on meetings lasting 30–120 minutes, with natural topic shifts, interruptions, and pragmatic markers?### **Q2. Accent robustness**Which classes of French accents induce the strongest WER degradation?How does robustness vary across FLEURS, African French, and Common Voice subsets?### **Q3. Telephony adaptation**What is the degradation curve when downsampling to 16 kHz / 8 kHz / μ-law compressed audio?### **Q4. Domain adaptation efficiency**What is the marginal gain of targeted fine-tuning on professional meeting datasets (education, administration, healthcare)?### **Q5. Multilingual side-effects**To what extent does French fine-tuning affect cross-lingual generalization?These research axes structure the development of future specialized Gilbert models.---## 3. Benchmark Reference ResultsThe following WER scores originate from established open benchmarks and serve as a *reference baseline* for future experiments:| Dataset | WER ||--------|-----|| MLS (FR) | 3.98 % || Common Voice FR (v13.0) | 7.28 % || VoxPopuli (FR) | 8.91 % || Fleurs (FR) | 4.84 % || African Accented French | 4.20 % |These results provide **upper bounds** before targeted fine-tuning.Future Gilbert variants will be evaluated using:- internal meeting datasets,- domain-specific corpora (administration, higher education, healthcare),- accented speech corpora,- telephony datasets,- long-form evaluation methods (> 1 hour audio).---## 4. ArchitectureThe model is based on the **Whisper Large V3** encoder–decoder architecture, offering:- large multilingual pretraining,- long-context modeling capacity,- robust cross-lingual alignment,- stable decoding for long outputs,- strong zero-shot performance on French.It is compatible with:- Hugging Face Transformers,- CTranslate2,- ONNX Runtime,- MLX (Apple Silicon),- quantization-based acceleration pipelines.---## 5. Methodology and Reproducibility`Gilbert-FR-Source` is used in strict research settings emphasizing:### **Reproducible training protocols**- frozen weights for baseline comparison,- controlled hyperparameter schedules,- consistent evaluation datasets,- deterministic decoding configurations.### **Evaluation methodology**WER is computed with standard normalization (lowercasing, punctuation removal).More advanced metrics (diarization error rate, long-context drift) are included in internal research pipelines.### **Versioning policy**This repository represents version `0.1` of the research baseline.All future fine-tuned models will explicitly reference this version for traceability.---## 6. LimitationsThis baseline inherits the known limitations of Whisper and of the underlying datasets:- sensitivity to overlapping speech,- occasional hallucinations in long-form decoding,- domain shift on spontaneous dialogue,- potential biases related to accent distribution in training data,- suboptimal performance in telephony bandwidth.Understanding and quantifying these limitations is one of the core objectives of the Gilbert research roadmap.---## 7. Future Work (Planned Research Directions)The following models will be developed as independent checkpoints:- **Gilbert-FR-Longform-v1**Long meetings, multi-speaker interaction, discourse-level context stability.- **Gilbert-FR-Accents-v1**Robustness to regional and international French accents.- **Gilbert-FR-Telephone-v1**Optimized for 8 kHz VoIP/call-center speech.- **Gilbert-Multilingual-v1**Extended cross-lingual performance with optimized French anchors.Each model will include detailed evaluation reports and will adhere to research reproducibility standards.---## 8. LicenseThis repository includes files distributed under the MIT License.> A copy of the MIT License is included.> Some files were originally released under MIT.All future Gilbert models built on top of this baseline are the exclusive property of Lexia France.---## 9. ContactFor research collaboration, evaluation access, or technical inquiries:- Website: https://gilbert-assistant.fr- Email: mathis@lexiapro.fr123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456---license: mitlanguage: frlibrary_name: transformerspipeline_tag: automatic-speech-recognitionthumbnail: nulltags:- automatic-speech-recognition- hf-asr-leaderboarddatasets:- mozilla-foundation/common_voice_13_0- facebook/multilingual_librispeech- facebook/voxpopuli- google/fleurs- gigant/african_accented_frenchmetrics:- wermodel-index:- name: whisper-large-v3-frenchresults:- task:name: Automatic Speech Recognitiontype: automatic-speech-recognitiondataset:name: Common Voice 13.0type: mozilla-foundation/common_voice_13_0config: frsplit: testargs:language: frmetrics:- name: WERtype: wervalue: 7.28- task:name: Automatic Speech Recognitiontype: automatic-speech-recognitiondataset:name: Multilingual LibriSpeech (MLS)type: facebook/multilingual_librispeechconfig: frenchsplit: testargs:language: frmetrics:- name: WERtype: wervalue: 3.98- task:name: Automatic Speech Recognitiontype: automatic-speech-recognitiondataset:name: VoxPopulitype: facebook/voxpopuliconfig: frsplit: testargs:language: frmetrics:- name: WERtype: wervalue: 8.91- task:name: Automatic Speech Recognitiontype: automatic-speech-recognitiondataset:name: Fleurstype: google/fleursconfig: fr_frsplit: testargs:language: frmetrics:- name: WERtype: wervalue: 4.84- task:name: Automatic Speech Recognitiontype: automatic-speech-recognitiondataset:name: African Accented Frenchtype: gigant/african_accented_frenchconfig: frsplit: testargs:language: frmetrics:- name: WERtype: wervalue: 4.20---# Whisper-Large-V3-FrenchWhisper-Large-V3-French is fine-tuned on `openai/whisper-large-v3` to further enhance its performance on the French language. This model has been trained to predict casing, punctuation, and numbers. While this might slightly sacrifice performance, we believe it allows for broader usage.This model has been converted into various formats, facilitating its usage across different libraries, including transformers, openai-whisper, fasterwhisper, whisper.cpp, candle, mlx, etc.## Table of Contents- [Performance](#performance)- [Usage](#usage)- [Hugging Face Pipeline](#hugging-face-pipeline)- [Hugging Face Low-level APIs](#hugging-face-low-level-apis)- [Speculative Decoding](#speculative-decoding)- [OpenAI Whisper](#openai-whisper)- [Faster Whisper](#faster-whisper)- [Whisper.cpp](#whispercpp)- [Candle](#candle)- [MLX](#mlx)- [Training details](#training-details)- [Acknowledgements](#acknowledgements)## PerformanceWe evaluated our model on both short and long-form transcriptions, and also tested it on both in-distribution and out-of-distribution datasets to conduct a comprehensive analysis assessing its accuracy, generalizability, and robustness.Please note that the reported WER is the result after converting numbers to text, removing punctuation (except for apostrophes and hyphens), and converting all characters to lowercase.All evaluation results on the public datasets can be found [here](https://drive.google.com/drive/folders/1rFIh6yXRVa9RZ0ieZoKiThFZgQ4STPPI?usp=drive_link).### Short-Form TranscriptionDue to the lack of readily available out-of-domain (OOD) and long-form test sets in French, we evaluated using internal test sets from [Zaion Lab](https://zaion.ai/). These sets comprise human-annotated audio-transcription pairs from call center conversations, which are notable for their significant background noise and domain-specific terminology.### Long-Form TranscriptionThe long-form transcription was run using the 🤗 Hugging Face pipeline for quicker evaluation. Audio files were segmented into 30-second chunks and processed in parallel.## Usage### Hugging Face PipelineThe model can easily used with the 🤗 Hugging Face [`pipeline`](https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline) class for audio transcription.For long-form transcription (> 30 seconds), you can activate the process by passing the `chunk_length_s` argument. This approach segments the audio into smaller segments, processes them in parallel, and then joins them at the strides by finding the longest common sequence. While this chunked long-form approach may have a slight compromise in performance compared to OpenAI's sequential algorithm, it provides 9x faster inference speed.```pythonimport torchfrom datasets import load_datasetfrom transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipelinedevice = "cuda:0" if torch.cuda.is_available() else "cpu"torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32# Load modelmodel_name_or_path = "bofenghuang/whisper-large-v3-french"processor = AutoProcessor.from_pretrained(model_name_or_path)model = AutoModelForSpeechSeq2Seq.from_pretrained(model_name_or_path,torch_dtype=torch_dtype,low_cpu_mem_usage=True,)model.to(device)# Init pipelinepipe = pipeline("automatic-speech-recognition",model=model,feature_extractor=processor.feature_extractor,tokenizer=processor.tokenizer,torch_dtype=torch_dtype,device=device,# chunk_length_s=30, # for long-form transcriptionmax_new_tokens=128,)# Example audiodataset = load_dataset("bofenghuang/asr-dummy", "fr", split="test")sample = dataset[0]["audio"]# Run pipelineresult = pipe(sample)print(result["text"])```### Hugging Face Low-level APIsYou can also use the 🤗 Hugging Face low-level APIs for transcription, offering greater control over the process, as demonstrated below:```pythonimport torchfrom datasets import load_datasetfrom transformers import AutoModelForSpeechSeq2Seq, AutoProcessordevice = "cuda:0" if torch.cuda.is_available() else "cpu"torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32# Load modelmodel_name_or_path = "bofenghuang/whisper-large-v3-french"processor = AutoProcessor.from_pretrained(model_name_or_path)model = AutoModelForSpeechSeq2Seq.from_pretrained(model_name_or_path,torch_dtype=torch_dtype,low_cpu_mem_usage=True,)model.to(device)# Example audiodataset = load_dataset("bofenghuang/asr-dummy", "fr", split="test")sample = dataset[0]["audio"]# Extract feautresinput_features = processor(sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt").input_features# Generate tokenspredicted_ids = model.generate(input_features.to(dtype=torch_dtype).to(device), max_new_tokens=128)# Detokenize to texttranscription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]print(transcription)```### Speculative Decoding[Speculative decoding](https://huggingface.co/blog/whisper-speculative-decoding) can be achieved using a draft model, essentially a distilled version of Whisper. This approach guarantees identical outputs to using the main Whisper model alone, offers a 2x faster inference speed, and incurs only a slight increase in memory overhead.Since the distilled Whisper has the same encoder as the original, only its decoder need to be loaded, and encoder outputs are shared between the main and draft models during inference.Using speculative decoding with the Hugging Face pipeline is simple - just specify the `assistant_model` within the generation configurations.```pythonimport torchfrom datasets import load_datasetfrom transformers import (AutoModelForCausalLM,AutoModelForSpeechSeq2Seq,AutoProcessor,pipeline,)device = "cuda:0" if torch.cuda.is_available() else "cpu"torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32# Load modelmodel_name_or_path = "bofenghuang/whisper-large-v3-french"processor = AutoProcessor.from_pretrained(model_name_or_path)model = AutoModelForSpeechSeq2Seq.from_pretrained(model_name_or_path,torch_dtype=torch_dtype,low_cpu_mem_usage=True,)model.to(device)# Load draft modelassistant_model_name_or_path = "bofenghuang/whisper-large-v3-french-distil-dec2"assistant_model = AutoModelForCausalLM.from_pretrained(assistant_model_name_or_path,torch_dtype=torch_dtype,low_cpu_mem_usage=True,)assistant_model.to(device)# Init pipelinepipe = pipeline("automatic-speech-recognition",model=model,feature_extractor=processor.feature_extractor,tokenizer=processor.tokenizer,torch_dtype=torch_dtype,device=device,generate_kwargs={"assistant_model": assistant_model},max_new_tokens=128,)# Example audiodataset = load_dataset("bofenghuang/asr-dummy", "fr", split="test")sample = dataset[0]["audio"]# Run pipelineresult = pipe(sample)print(result["text"])```### OpenAI WhisperYou can also employ the sequential long-form decoding algorithm with a sliding window and temperature fallback, as outlined by OpenAI in their original [paper](https://arxiv.org/abs/2212.04356).First, install the [openai-whisper](https://github.com/openai/whisper) package:```bashpip install -U openai-whisper```Then, download the converted model:```bashpython -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='bofenghuang/whisper-large-v3-french', filename='original_model.pt', local_dir='./models/whisper-large-v3-french')"```Now, you can transcirbe audio files by following the usage instructions provided in the repository:```pythonimport whisperfrom datasets import load_dataset# Load modelmodel = whisper.load_model("./models/whisper-large-v3-french/original_model.pt")# Example audiodataset = load_dataset("bofenghuang/asr-dummy", "fr", split="test")sample = dataset[0]["audio"]["array"].astype("float32")# Transcriberesult = model.transcribe(sample, language="fr")print(result["text"])```### Faster WhisperFaster Whisper is a reimplementation of OpenAI's Whisper models and the sequential long-form decoding algorithm in the [CTranslate2](https://github.com/OpenNMT/CTranslate2) format.Compared to openai-whisper, it offers up to 4x faster inference speed, while consuming less memory. Additionally, the model can be quantized into int8, further enhancing its efficiency on both CPU and GPU.First, install the [faster-whisper](https://github.com/SYSTRAN/faster-whisper) package:```bashpip install faster-whisper```Then, download the model converted to the CTranslate2 format:```bashpython -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='bofenghuang/whisper-large-v3-french', local_dir='./models/whisper-large-v3-french', allow_patterns='ctranslate2/*')"```Now, you can transcirbe audio files by following the usage instructions provided in the repository:```pythonfrom datasets import load_datasetfrom faster_whisper import WhisperModel# Load modelmodel = WhisperModel("./models/whisper-large-v3-french/ctranslate2", device="cuda", compute_type="float16") # Run on GPU with FP16# Example audiodataset = load_dataset("bofenghuang/asr-dummy", "fr", split="test")sample = dataset[0]["audio"]["array"].astype("float32")segments, info = model.transcribe(sample, beam_size=5, language="fr")for segment in segments:print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))```### Whisper.cppWhisper.cpp is a reimplementation of OpenAI's Whisper models, crafted in plain C/C++ without any dependencies. It offers compatibility with various backends and platforms.Additionally, the model can be quantized to either 4-bit or 5-bit integers, further enhancing its efficiency.First, clone and build the [whisper.cpp](https://github.com/ggerganov/whisper.cpp) repository:```bashgit clone https://github.com/ggerganov/whisper.cpp.gitcd whisper.cpp# build the main examplemake```Next, download the converted ggml weights from the Hugging Face Hub:```bash# Download model quantized with Q5_0 methodpython -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='bofenghuang/whisper-large-v3-french', filename='ggml-model-q5_0.bin', local_dir='./models/whisper-large-v3-french')"```Now, you can transcribe an audio file using the following command:```bash./main -m ./models/whisper-large-v3-french/ggml-model-q5_0.bin -l fr -f /path/to/audio/file --print-colors```### Candle[Candle-whisper](https://github.com/huggingface/candle/tree/main/candle-examples/examples/whisper) is a reimplementation of OpenAI's Whisper models in the candle format - a lightweight ML framework built in Rust.First, clone the [candle](https://github.com/huggingface/candle) repository:```bashgit clone https://github.com/huggingface/candle.gitcd candle/candle-examples/examples/whisper```Transcribe an audio file using the following command:```bashcargo run --example whisper --release -- --model large-v3 --model-id bofenghuang/whisper-large-v3-french --language fr --input /path/to/audio/file```In order to use CUDA add `--features cuda` to the example command line:```bashcargo run --example whisper --release --features cuda -- --model large-v3 --model-id bofenghuang/whisper-large-v3-french --language fr --input /path/to/audio/file```### MLX[MLX-Whisper](https://github.com/ml-explore/mlx-examples/tree/main/whisper) is a reimplementation of OpenAI's Whisper models in the [MLX](https://github.com/ml-explore/mlx) format - a ML framework on Apple silicon. It supports features like lazy computation, unified memory management, etc.First, clone the [MLX Examples](https://github.com/ml-explore/mlx-examples) repository:```bashgit clone https://github.com/ml-explore/mlx-examples.gitcd mlx-examples/whisper```Next, install the dependencies:```bashpip install -r requirements.txt```Download the pytorch checkpoint in the original OpenAI format and convert it into MLX format (We haven't included the converted version here since the repository is already heavy and the conversion is very fast):```bash# Downloadpython -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='bofenghuang/whisper-large-v3-french', filename='original_model.pt', local_dir='./models/whisper-large-v3-french')"# Convert into .npzpython convert.py --torch-name-or-path ./models/whisper-large-v3-french/original_model.pt --mlx-path ./mlx_models/whisper-large-v3-french```Now, you can transcribe audio with:```pythonimport whisperresult = whisper.transcribe("/path/to/audio/file", path_or_hf_repo="mlx_models/whisper-large-v3-french", language="fr")print(result["text"])```## Training detailsWe've collected a composite dataset consisting of over 2,500 hours of French speech recognition data, which incldues datasets such as [Common Voice 13.0](https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0), [Multilingual LibriSpeech](https://huggingface.co/datasets/facebook/multilingual_librispeech), [Voxpopuli](https://huggingface.co/datasets/facebook/voxpopuli), [Fleurs](https://huggingface.co/datasets/google/fleurs), [Multilingual TEDx](https://www.openslr.org/100/), [MediaSpeech](https://www.openslr.org/108/), [African Accented French](https://huggingface.co/datasets/gigant/african_accented_french), etc.Given that some datasets, like MLS, only offer text without case or punctuation, we employed a customized version of 🤗 [Speechbox](https://github.com/huggingface/speechbox) to restore case and punctuation from a limited set of symbols using the [bofenghuang/whisper-large-v2-cv11-french](bofenghuang/whisper-large-v2-cv11-french) model.However, even within these datasets, we observed certain quality issues. These ranged from mismatches between audio and transcription in terms of language or content, poorly segmented utterances, to missing words in scripted speech, etc. We've built a pipeline to filter out many of these problematic utterances, aiming to enhance the dataset's quality. As a result, we excluded more than 10% of the data, and when we retrained the model, we noticed a significant reduction of hallucination.For training, we employed the [script](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py) available in the 🤗 Transformers repository. The model training took place on the [Jean-Zay supercomputer](http://www.idris.fr/eng/jean-zay/jean-zay-presentation-eng.html) at GENCI, and we extend our gratitude to the IDRIS team for their responsive support throughout the project.## Acknowledgements- OpenAI for creating and open-sourcing the [Whisper model](https://arxiv.org/abs/2212.04356)- 🤗 Hugging Face for integrating the Whisper model and providing the training codebase within the [Transformers](https://github.com/huggingface/transformers) repository- [Genci](https://genci.fr/) for their generous contribution of GPU hours to this project
README.md+391-130