Conformer for the 25,000 hours of the LargeScaleASR dataset
This model is a contribution of the Samsung AI Center-Cambridge.
This repository provides all the necessary tools to perform automatic speech recognition from an end-to-end system pretrained on LargeScaleASR (EN) within SpeechBrain. For a better experience, we encourage you to learn more about SpeechBrain. The performance of the model is the following:
#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 | 8xA100 32GB |
If you want to train your own model on this dataset, please refer to the SpeechBrain toolkit.
Pipeline description
This ASR system is composed of 2 different but linked blocks:
- Tokenizer (unigram) that transforms words into subword units and trained with the train transcriptions of the LargeScaleASR dataset.
- Acoustic model made of a conformer encoder and a joint decoder with CTC + transformer. Hence, the decoding also incorporates the 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 needed.
Install SpeechBrain
First of all, please install SpeechBrain with the following command:
pip install speechbrain
Please notice that we encourage you to read our tutorials and learn more about SpeechBrain.
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")
# For a full decoding with a large beam size (can be slow):
asr_model.transcribe_file("speechbrain/asr-conformer-largescaleasr/example.wav")
# For smaller beam size:
asr_model.transcribe_file("speechbrain/asr-conformer-largescaleasr/example.wav", overrides={"test_beam_size":"10"})
# For even faster decoding
asr_model.transcribe_file("speechbrain/asr-conformer-largescaleasr/example.wav", overrides={"test_beam_size":"10", "ctc_weight_decode":0.0})
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
Please, see this Colab notebook to figure out how to transcribe in parallel a batch of input sentences using a pre-trained model.
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}
}
- Downloads last month
- 50