STT European FastConformer Hybrid Transducer-CTC Large P&C

STT European FastConformer Hybrid Transducer-CTC Large P&C

Logo for STT European FastConformer Hybrid Transducer-CTC Large P&C
Description
English / Spanish / French / German speech recognition model with a FastConformer large (114M) encoder and a Hybrid decoder (joint RNNT-CTC loss). The model has a vocab size of 2560 and emits text with punctuation and capitalization.
Publisher
NVIDIA
Latest Version
1.21.0
Modified
July 20, 2023
Size
416 MB

Model Overview

This collection contains the Multilingual FastConformer Hybrid (Transducer and CTC) Large model (around 114M parameters) with Punctuation and Capitalization. It is trained on the NeMo PnC German, English, Spanish, and French ASR sets that contain 14,288 hours of speech in total.

It utilizes a Google SentencePiece [1] tokenizer with vocabulary size 256 per language and transcribes text in upper and lower case along with spaces, periods, commas, question marks and a few other language-specific characters. The total tokenizer size is 2560, of which 1024 tokens are allocated to English, German, French, and Spanish. The remaining tokens are reserved for future languages.

Model Architecture

FastConformer is an optimized version of the Conformer model [2] with 8x depthwise-separable convolutional downsampling. The model is trained in a multitask setup with joint Transducer and CTC decoder loss. You may find more information on the details of FastConformer here: Fast-Conformer Model and about Hybrid Transducer-CTC training here: Hybrid Transducer-CTC.

Training

The NeMo toolkit [3] was used for training the model for ~500,000 steps with this example script and this base config.

Monolingual tokenizers for this model were built using the text transcripts of each train set with this script. The Aggregate Tokenizer was used to train the multilingual model.

Datasets

The model was trained on a composite dataset (NeMo PnC ASRSET) comprising of 14,288 hours of speech in total:

  • German (2509 hrs)
  • English (8580 hrs)
  • Spanish (1400 hrs)
  • French (1799 hrs)

Tokenizer Construction

Tokenizers for this model were built separately for each language using the respective text corpus provided with the train dataset. Then, the Aggregate Tokenizer feature was used to train the model.

We build each 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=256 \
  --tokenizer="spe" \
  --spe_type="unigram" \
  --spe_character_coverage=1.0 \
  --no_lower_case \
  --log

Performance

The following tables summarizes the performance of the models in this collection with the Transducer decoder. Performances of the ASR model are reported in terms of Word Error Rate (WER%) with greedy decoding.

a) On data without Punctuation and Capitalization with Transducer decoder

Version Tokenizer Vocabulary Size DE MCV12 TEST EN MCV11 TEST ES MCV12 TEST FR MCV12 TEST
1.21.0 SentencePiece Unigram 2560 5.67 8.72 4.64 8.24

b) On data with Punctuation and Capitalization with Transducer decoder

Version Tokenizer Vocabulary Size DE MCV12 TEST EN MCV11 TEST ES MCV12 TEST FR MCV12 TEST
1.21.0 SentencePiece Unigram 2560 5.91 10.59 7.11 9.31

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.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="stt_multilingual_fastconformer_hybrid_large_pc_blend_eu")

Transcribing text with this model

Using Transducer mode inference:

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

Using CTC mode inference:

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

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. The model only outputs the punctuations: '.', ',', '?' and hence might not do well in scenarios where other punctuations are also expected.

References

[1] Google Sentencepiece Tokenizer

[2] Conformer: Convolution-augmented Transformer for Speech Recognition

[3] NVIDIA NeMo Toolkit

Licence

License to use this model is covered by the NGC TERMS OF USE 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 NGC TERMS OF USE.