Downloads · 30 days
23
1% of all-time downloads
dominguesm/stt_pt_quartznet15x5_ctc_small
stt_pt_quartznet15x5_ctc_small is a automatic speech recognition model from dominguesm. Use it when you need speech turned into text. It is set up for nemo. The card lists the license as cc-by-4.0.
This model transcribes speech in lower case Portuguese alphabet along with spaces. It is a "small" versions of QuartzNet-CTC model.
Downloads · 30 days
23
1% of all-time downloads
All-time downloads
2.2K
Public
Repo size
76.3 MB
Likes
4
Public
Click a slice to open those files.
.nemo76.3 MB · 100%
From the Hugging Face model README
This model transcribes speech in lower case Portuguese alphabet along with spaces. It is a "small" versions of QuartzNet-CTC model.
To train, fine-tune or play with the model you will need to install NVIDIA NeMo. We recommend you install it after you've installed latest Pytorch version.
pip install nemo_toolkit['all']
The model is available for use in the NeMo toolkit [1], and can be used as a pre-trained checkpoint for inference or for fine-tuning on another dataset.
import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.ASRModel.from_pretrained("dominguesm/stt_pt_quartznet15x5_ctc_small")
First, let's get a sample
wget https://github.com/DominguesM/stt_pt_quartznet15x5_ctc_small/raw/main/audios/common_voice_pt_25555332.mp3
Then simply do:
asr_model.transcribe(['common_voice_pt_25555332.mp3'])
python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py pretrained_name="dominguesm/stt_pt_quartznet15x5_ctc_small" audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
This model accepts 16000 KHz Mono-channel Audio (wav files) as input.
This model provides transcribed speech as a string for a given audio sample.
This model are based on the QuartzNet architecture, which is a variant of Jasper that uses 1D time-channel separable convolutional layers in its convolutional residual blocks and are therefore smaller than Jasper models.
QuartzNet models take in audio segments and transcribe them to letter, byte pair, or word piece sequences.
All training scripts will be available at: DominguesM/stt_pt_quartznet15x5_ctc_small
The model was trained with a part of the Common Voices 9.0 dataset in Portuguese, totaling 26 hours of audio.
| Metric | Score |
|---|---|
| WER | 49% |
| CER | 18% |
The metrics were obtained using the following code:
Attention: The steps below must be performed after downloading the dataset (Mozilla Commom Voices 9.0 PT) and following the steps of pre-processing the audio data and manifest files contained in the file notebooks/Finetuning CTC model Portuguese.ipynb
$ wget -P scripts/ "https://raw.githubusercontent.com/NVIDIA/NeMo/v1.9.0/examples/asr/speech_to_text_eval.py"
$ wget -P scripts/ "https://raw.githubusercontent.com/NVIDIA/NeMo/v1.9.0/examples/asr/transcribe_speech.py"
$ python scripts/speech_to_text_eval.py \
pretrained_name="dominguesm/stt_pt_quartznet15x5_ctc_small" \
dataset_manifest="manifests/pt/commonvoice_test_manifest_processed.json" \
output_filename="./evaluation_transcripts.json" \
batch_size=32 \
amp=true \
use_cer=false
Since this model was trained on publically available speech datasets, the performance of this model might degrade for speech which includes technical terms, or vernacular that the model has not been trained on. The model might also perform worse for accented speech.
If you use our work, please cite:
@misc{domingues2022quartznet15x15-small-portuguese,
title={Fine-tuned {Quartznet}-15x5 CTC small model for speech recognition in {P}ortuguese},
author={Domingues, Maicon},
howpublished={\url{https://huggingface.co/dominguesm/stt_pt_quartznet15x5_ctc_small}},
year={2022}
}