Skip to content

Add streaming inference support for Unified RNNT model#15522

Draft
andrusenkoau wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
andrusenkoau:unified_streaming_inference
Draft

Add streaming inference support for Unified RNNT model#15522
andrusenkoau wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
andrusenkoau:unified_streaming_inference

Conversation

@andrusenkoau
Copy link
Collaborator

@andrusenkoau andrusenkoau commented Mar 19, 2026

Important

The Update branch button must only be pressed in very rare occassions.
An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.

What does this PR do ?

Add streaming inference support for a Unified RNNT model. The training scripts for the Unified RNNT model will be released later.

The Unified RNNT model is a standard FastConformer RNNT model trained jointly in both offline and streaming modes. During streaming training, we replace the full attention masks with chunked limited masks (including left, middle, and right context) and use Dynamic Chunked Convolutions to adapt the model for streaming inference. All the other parameters are shared and the same as in offline training.

Collection: [ASR]

Changelog

  • Add specific line by line info of high level changes in this PR.

Usage

The Unified RNNT model supports only chunked inference with recomputation of the left context. Cache decoding will be implemented later.

python ${NEMO_DIR}/examples/asr/asr_chunked_inference/rnnt/speech_to_text_streaming_infer_rnnt.py \
    model_path=${ASR_MODEL} \
    dataset_manifest=${DECODING_MANIFEST} \
    output_filename=${OUTPUT_MANIFEST} \
    left_context_secs=${LEFT_CONTEXT} \
    chunk_secs=${CHUNK_SECS} \
    right_context_secs=${RIGHT_CONTEXT} \
    att_context_size_as_chunk=true \
    calculate_wer=true \
    calculate_rtfx=true \
    batch_size=${BATCH_SIZE}

During streaming inference, you can utilize flexible context parameters. However, we recommend using the following context parameters:

Left, s Chunk, s Right, s Latency (C+R), s
5.6 1.12 1.12 2.24
5.6 0.56 0.56 1.12
5.6 0.16 0.40 0.56
5.6 0.08 0.24 0.32
5.6 0.08 0.16 0.24
5.6 0.08 0.08 0.08

GitHub Actions CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

  • Related to # (issue)

Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
@github-actions github-actions bot added the ASR label Mar 19, 2026
Signed-off-by: andrusenkoau <andrusenkoau@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant