🚀 Conformer for the 25,000 hours of the LargeScaleASR dataset
This model is a contribution of the Samsung AI Center-Cambridge.
This repository offers all the essential tools for automatic speech recognition. It uses an end-to-end system pretrained on LargeScaleASR (EN) within SpeechBrain. For an enhanced experience, we recommend learning more about SpeechBrain.
The model's performance is as follows:
#params |
validation WER |
test WER |
LibriSpeech test-other |
CommonVoice 18 test |
Voxpopuli test |
GPUs |
480M |
6.8 |
7.5 |
4.6 |
12.0 |
6.9 |
8xV100 32GB |
If you wish to train your own model on this dataset, refer to the SpeechBrain toolkit.
✨ Features
Pipeline description
This ASR system consists of two distinct yet interconnected blocks:
- Tokenizer (unigram): Transforms words into subword units and is trained with the train transcriptions of the LargeScaleASR dataset.
- Acoustic model: Composed of a conformer encoder and a joint decoder with CTC + transformer. Thus, the decoding also incorporates CTC probabilities.
The system is trained with recordings sampled at 16kHz (single channel). The code will automatically normalize your audio (i.e., resampling + mono channel selection) when calling transcribe_file if necessary.
📦 Installation
Install SpeechBrain
First, install SpeechBrain using the following command:
pip install speechbrain
We encourage you to read our tutorials and learn more about SpeechBrain.
💻 Usage Examples
Transcribing your own audio files (in English)
from speechbrain.inference.ASR import EncoderDecoderASR
asr_model = EncoderDecoderASR.from_hparams(source="speechbrain/asr-conformer-largescaleasr", savedir="pretrained_models/asr-conformer-largescaleasr")
asr_model = EncoderDecoderASR.from_hparams(source="speechbrain/asr-conformer-largescaleasr", savedir="pretrained_models/asr-conformer-largescaleasr", overrides={"test_beam_size":"1"})
asr_model = EncoderDecoderASR.from_hparams(source="speechbrain/asr-conformer-largescaleasr", savedir="pretrained_models/asr-conformer-largescaleasr", overrides={"scorer":None, "ctc_weight_decode":0.0})
asr_model.transcribe_file("speechbrain/asr-conformer-largescaleasr/example.wav")
Inference on GPU
To perform inference on the GPU, add run_opts={"device":"cuda"}
when calling the from_hparams
method.
Parallel Inference on a Batch
See this Colab notebook to learn how to transcribe a batch of input sentences in parallel using a pre-trained model.
📚 Documentation
About SpeechBrain
- Website: https://speechbrain.github.io/
- Code: https://github.com/speechbrain/speechbrain/
- HuggingFace: https://huggingface.co/speechbrain/
Citing SpeechBrain
Please cite SpeechBrain if you use it for your research or business.
@article{speechbrainV1,
author = {Mirco Ravanelli and Titouan Parcollet and Adel Moumen and Sylvain de Langen and Cem Subakan and Peter Plantinga and Yingzhi Wang and Pooneh Mousavi and Luca Della Libera and Artem Ploujnikov and Francesco Paissan and Davide Borra and Salah Zaiem and Zeyu Zhao and Shucong Zhang and Georgios Karakasidis and Sung-Lin Yeh and Pierre Champion and Aku Rouhe and Rudolf Braun and Florian Mai and Juan Zuluaga-Gomez and Seyed Mahed Mousavi and Andreas Nautsch and Ha Nguyen and Xuechen Liu and Sangeet Sagar and Jarod Duret and Salima Mdhaffar and Ga{{\"e}}lle Laperri{{\`e}}re and Mickael Rouvier and Renato De Mori and Yannick Est{{\`e}}ve},
title = {Open-Source Conversational AI with SpeechBrain 1.0},
journal = {Journal of Machine Learning Research},
year = {2024},
volume = {25},
number = {333},
pages = {1--11},
url = {http://jmlr.org/papers/v25/24-0991.html}
}
📄 License
This project is licensed under the apache-2.0
license.