NGC | Catalog
CatalogModelsSTT En Squeezeformer CTC XSmall Librispeech

STT En Squeezeformer CTC XSmall Librispeech

For downloads and more information, please view on a desktop device.
Logo for STT En Squeezeformer CTC XSmall Librispeech

Description

Squeezeformer XSmall model for English Automatic Speech Recognition, Trained with NeMo on LibriSpeech dataset

Publisher

NVIDIA

Use Case

Speech Recognition

Framework

PyTorch

Latest Version

1.13.0

Modified

September 29, 2022

Size

35.09 MB

Model Overview

Squeezeformer X-Small model which has been trained on the Librispeech 960 hours corpus.

It utilizes a Google SentencePiece [1] tokenizer with vocabulary size 128, and transcribes text in lower case english alphabet along with spaces, apostrophes and a few other characters.

Model Architecture

Squeezeformer CTC [2] model is an non-autoregressive, connectionist-temporal-classification based Automatic Speech Recognition model. You may find more info on the detail of this model here: Squeezeformer Model.

Training

The NeMo toolkit [3] was used for training the models for over several hundred epochs. These model are trained with this example script and this base config.

The tokenizers for these models were built using the text transcripts of the train set with this script.

Datasets

All the models in this collection are trained on a composite dataset (NeMo ASRSET) comprising of several thousand hours of English speech:

  • LibriSpeech 960 hours of English speech

Tokenizer Construction

The tokenizer for this model was built using text corpus provided with the train dataset.

We build a Google Sentencepiece Tokenizer [1] with the following script :

python [NEMO_GIT_FOLDER]/scripts/tokenizers/process_asr_text_tokenizer.py \
  --manifest="train_manifest.json" \
  --data_root="<OUTPUT DIRECTORY FOR TOKENIZER>" \
  --vocab_size=128 \
  --tokenizer="spe" \
  --spe_type="unigram" \
  --spe_character_coverage=1.0 \
  --no_lower_case \
  --log

Performance

The performance of Automatic Speech Recognition models is measuring using Word Error Rate.

The model obtains the following scores on the following evaluation datasets -

Version Tokenizer Vocabulary Size LS dev-clean LS test-clean LS dev-other LS test-other Train Dataset
1.13.0 Google Sentencepiece 128 3.6 3.8 9.7 9.4 Librispeech 960 h

Note that these scores on Librispeech are not particularly indicative of the quality of transcriptions that models trained on ASR Set will achieve, but they are a useful proxy.

How to Use this Model

The model is available for use in the NeMo toolkit [3], and can be used as a pre-trained checkpoint for inference or for fine-tuning on another dataset.

Automatically load the model from NGC

import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.EncDecCTCModelBPE.from_pretrained(model_name="stt_en_squeezeformer_ctc_xsmall_ls")

Transcribing text with this model

python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py \
  pretrained_name="stt_en_squeezeformer_ctc_xsmall_ls" \
  audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"

Input

This model accepts 16000 KHz Mono-channel Audio (wav files) as input.

Output

This model provides transcribed speech as a string for a given audio sample.

Limitations

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.

References

[1] Google Sentencepiece Tokenizer

[2] Squeezeformer: An Efficient Transformer for Automatic Speech Recognition

[3] NVIDIA NeMo Toolkit

Licence

License to use this model is covered by the CC-BY-4 License unless another License/Terms Of Use/EULA is clearly specified. By downloading the public and release version of the model, you accept the terms and conditions of the CC-BY-4 License.