Edit model card

NVIDIA Streaming Conformer-Hybrid Large (en-US)

| Model architecture | Model size | Language

This collection contains large-size versions of cache-aware FastConformer-Hybrid (around 114M parameters) with multiple look-ahead support, trained on a large scale english speech. These models are trained for streaming ASR, which be used for streaming applications with a variety of latencies (0ms, 80ms, 480s, 1040ms). These are the worst latency and average latency of the model for each case would be half of these numbers. You may find more detail and evalution results here [5].

Model Architecture

These models are cache-aware versions of Hybrid FastConfomer which are trained for streaming ASR. You may find more info on cache-aware models here: Cache-aware Streaming Conformer [5]. The models are trained with multiple look-aheads which makes the model to be able to support different latencies. To learn on how to switch between different look-ahead, you may read the documentation on the cache-aware models.

FastConformer [4] is an optimized version of the Conformer model [1], and you may find more information on the details of FastConformer here: Fast-Conformer Model.

The model is trained in a multitask setup with joint Transducer and CTC decoder loss [5]. You can find more about Hybrid Transducer-CTC training here: Hybrid Transducer-CTC. You may also find more on how to switch between the Transducer and CTC decoders in the documentation.

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 SentencePiece tokenizers [2] 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
  • Fisher Corpus
  • Switchboard-1 Dataset
  • WSJ-0 and WSJ-1
  • National Speech Corpus (Part 1, Part 6)
  • VCTK
  • VoxPopuli (EN)
  • Europarl-ASR (EN)
  • Multilingual Librispeech (MLS EN) - 2,000 hours subset
  • Mozilla Common Voice (v7.0)
  • People's Speech - 12,000 hrs subset

Note: older versions of the model may have trained on smaller set of datasets.

Performance

The list of the available models in this collection is shown in the following tables for both CTC and Transducer decoders. Performances of the ASR models are reported in terms of Word Error Rate (WER%) with greedy decoding.

Transducer Decoder

att_context_sizes LS test-other ([70,13]-1040ms) LS test-other ([70,6]-480ms) LS test-other ([70,1]-80ms) LS test-other ([70,0]-0s) Train Dataset
[[70,13],[70,6],[70,1],[70,0]] 5.4 5.7 6.4 7.0 NeMo ASRSET 3.0

CTC Decoder

att_context_sizes LS test-other ([70,13]-1040ms) LS test-other ([70,6]-480ms) LS test-other ([70,1]-80ms) LS test-other ([70,0]-0s) Train Dataset
[[70,13],[70,6],[70,1],[70,0]] 6.2 6.7 7.8 8.4 NeMo ASRSET 3.0

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 streaming or for fine-tuning on another dataset. You will need to install NVIDIA NeMo. We recommend you install it after you've installed latest Pytorch version.

pip install nemo_toolkit['all']

Simulate Streaming ASR

You may use this script to simulate streaming ASR with these models: cache-aware streaming simulation. You may use --att_context_size to set the context size otherwise, the default, which is the first context size in the list (1040ms), is going to be used.

Transcribing using Python

Cache-aware models are designed in a way that the model's predictions are the same in both offline and streaming mode.

So you may use the regular transcribe function to get the transcriptions. First, let's get a sample:

wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav

Then simply do:

import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="nvidia/stt_en_fastconformer_hybrid_large_streaming_multi")

# Optional: change the default latency. Default latency is 1040ms. Supported latencies: {0: 0ms, 1: 80ms, 16: 480ms, 33: 1040ms}.
# Note: These are the worst latency and average latency would be half of these numbers.
asr_model.encoder.set_default_att_context_size([70,13]) 

#Optional: change the default decoder. Default decoder is Transducer (RNNT). Supported decoders: {ctc, rnnt}.
asr_model.change_decoding_strategy(decoder_type='rnnt')

asr_model.transcribe(['2086-149220-0033.wav'])

Transcribing many audio files

Using Transducer mode inference:

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

Using CTC mode inference:

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

To change between different look-aheads you may set att_context_size of the script transcribe_speech.py as the following:

python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py \
  pretrained_name="stt_en_fastconformer_hybrid_large_streaming_multi" \
  audio_dir="<DIRECTORY CONTAINING AUDIO FILES>" \
  att_context_size=[70,0]

Supported values for att_context_size: {[70,0]: 0ms, [70,1]: 80ms, [70,16]: 480ms, [70,33]: 1040ms}.

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 publicly 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.

NVIDIA Riva: Deployment

NVIDIA Riva, is an accelerated speech AI SDK deployable on-prem, in all clouds, multi-cloud, hybrid, on edge, and embedded. Additionally, Riva provides:

  • World-class out-of-the-box accuracy for the most common languages with model checkpoints trained on proprietary data with hundreds of thousands of GPU-compute hours
  • Best in class accuracy with run-time word boosting (e.g., brand and product names) and customization of acoustic model, language model, and inverse text normalization
  • Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support

Although this model isn’t supported yet by Riva, the list of supported models is here.
Check out Riva live demo.

References

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

[2] Google Sentencepiece Tokenizer

[3] NVIDIA NeMo Toolkit

[4] Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition

[5] Stateful Conformer with Cache-based Inference for Streaming Automatic Speech Recognition

Downloads last month
655
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Datasets used to train nvidia/stt_en_fastconformer_hybrid_large_streaming_multi

Evaluation results