đ wav2vec 2.0 with CTC/Attention trained on DVoice Darija (No LM)
This repository offers all the essential tools for automatic speech recognition. It utilizes an end - to - end system pretrained on a DVoice Darija dataset within SpeechBrain. For an enhanced experience, we recommend learning more about SpeechBrain.
Property |
Details |
Model Type |
wav2vec 2.0 with CTC/Attention |
Training Data |
DVoice Darija dataset |
License |
apache - 2.0 |
Datasets |
commonvoice |
Metrics |
wer, cer |
DVoice Release |
Val. CER |
Val. WER |
Test CER |
Test WER |
v2.0 |
5.51 |
18.46 |
5.85 |
18.28 |
đ Quick Start
This ASR system consists of two distinct yet interconnected components:
- A Tokenizer (unigram) that converts words into subword units and is trained using the training transcriptions.
- An Acoustic model (wav2vec2.0 + CTC). A pretrained wav2vec 2.0 model (facebook/wav2vec2-large-xlsr-53) is combined with two DNN layers and fine - tuned on the Darija dataset. The resulting final acoustic representation is fed into the CTC greedy decoder. The system is trained with 16kHz single - channel recordings. The code will automatically normalize your audio (i.e., resampling + mono channel selection) when calling transcribe_file if necessary.
đĻ Installation
First, install transformers
and SpeechBrain using the following command:
pip install speechbrain transformers
We recommend reading the SpeechBrain tutorials and learning more about SpeechBrain.
đģ Usage Examples
Basic Usage
from speechbrain.pretrained import EncoderASR
asr_model = EncoderASR.from_hparams(source="aioxlabs/dvoice-darija", savedir="pretrained_models/asr-wav2vec2-dvoice-dar")
asr_model.transcribe_file('./the_path_to_your_audio_file')
Advanced Usage
To perform inference on the GPU, add run_opts={"device":"cuda"}
when calling the from_hparams
method.
đ Documentation
To train the model from scratch, please refer to our GitHub tutorial here.
đ§ Technical Details
The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
đ License
The project is licensed under the "apache - 2.0" license.
đ Referencing SpeechBrain
@misc{SB2021,
author = {Ravanelli, Mirco and Parcollet, Titouan and Rouhe, Aku and Plantinga, Peter and Rastorgueva, Elena and Lugosch, Loren and Dawalatabad, Nauman and Ju - Chieh, Chou and Heba, Abdel and Grondin, Francois and Aris, William and Liao, Chien - Feng and Cornell, Samuele and Yeh, Sung - Lin and Na, Hwidong and Gao, Yan and Fu, Szu - Wei and Subakan, Cem and De Mori, Renato and Bengio, Yoshua },
title = {SpeechBrain},
year = {2021},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\\\\url{https://github.com/speechbrain/speechbrain}},
}
đĨ About the Projects
About DVoice
DVoice is a community - led initiative aiming to provide data and models for Africa's low - resource languages to facilitate the use of voice technologies. Due to the lack of data for these languages, specific data collection methods are employed. Two approaches are currently used: the DVoice platforms (https://dvoice.ma and https://dvoice.sn), based on Mozilla Common Voice, for collecting authentic community recordings, and transfer learning techniques for automatically labeling recordings retrieved from social media. The DVoice platform currently manages 7 languages, including Darija (Moroccan Arabic dialect), Wolof, Mandingo, Serere, Pular, Diola, and Soninke.
For this project, AIOX Labs and the SI2M Laboratory are collaborating to build the future of technologies.
About AIOX Labs
Based in Rabat, London, and Paris, AIOX - Labs leverages artificial intelligence technologies to meet the business needs and data projects of companies.
- It serves the growth of groups, process optimization, and customer experience improvement.
- AIOX - Labs operates across multiple sectors, from fintech to industry, including retail and consumer goods.
- It offers business - ready data products with a solid algorithmic foundation and adaptability to each client's specific needs.
- The team consists of AI doctors and business experts with a strong scientific background and international publications.
Website: [https://www.aiox - labs.com/](https://www.aiox - labs.com/)
SI2M Laboratory
The Information Systems, Intelligent Systems, and Mathematical Modeling Research Laboratory (SI2M) is an academic research laboratory of the National Institute of Statistics and Applied Economics (INSEA). Its research areas include Information Systems, Intelligent Systems, Artificial Intelligence, Decision Support, Network and System Security, and Mathematical Modelling.
Website: [SI2M Laboratory](https://insea.ac.ma/index.php/pole - recherche/equipe - de - recherche/150 - laboratoire - de - recherche - en - systemes - d - information - systemes - intelligents - et - modelisation - mathematique)
About SpeechBrain
SpeechBrain is an open - source, all - in - one speech toolkit. It is designed to be simple, highly flexible, and user - friendly, achieving competitive or state - of - the - art performance in various domains.
Website: https://speechbrain.github.io/
GitHub: https://github.com/speechbrain/speechbrain
đ Acknowledgements
This research was supported by the computational resources of HPC - MARWAN (www.marwan.ma/hpc) provided by CNRST, Rabat, Morocco. We express our sincere gratitude to this institution.