Streaming decoding policies (Wait-K and AlignAtt) for Canary model#14765
Merged
andrusenkoau merged 68 commits intoNVIDIA-NeMo:mainfrom Oct 13, 2025
Merged
Streaming decoding policies (Wait-K and AlignAtt) for Canary model#14765andrusenkoau merged 68 commits intoNVIDIA-NeMo:mainfrom
andrusenkoau merged 68 commits intoNVIDIA-NeMo:mainfrom
Conversation
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@users.noreply.github.com>
examples/asr/asr_chunked_inference/aed/speech_to_text_aed_streaming_infer.py
Fixed
Show fixed
Hide fixed
examples/asr/asr_chunked_inference/aed/speech_to_text_aed_streaming_infer.py
Fixed
Show fixed
Hide fixed
examples/asr/asr_chunked_inference/aed/speech_to_text_aed_streaming_infer.py
Fixed
Show fixed
Hide fixed
nemo/collections/asr/parts/submodules/aed_decoding/aed_batched_streaming.py
Fixed
Show fixed
Hide fixed
nemo/collections/asr/parts/submodules/aed_decoding/aed_batched_streaming.py
Fixed
Show fixed
Hide fixed
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@users.noreply.github.com>
examples/asr/asr_chunked_inference/aed/speech_to_text_aed_streaming_infer.py
Fixed
Show fixed
Hide fixed
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@users.noreply.github.com>
examples/asr/asr_chunked_inference/aed/speech_to_text_aed_streaming_infer.py
Fixed
Show fixed
Hide fixed
examples/asr/asr_chunked_inference/aed/speech_to_text_aed_streaming_infer.py
Fixed
Show fixed
Hide fixed
examples/asr/asr_chunked_inference/aed/speech_to_text_aed_streaming_infer.py
Fixed
Show fixed
Hide fixed
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@users.noreply.github.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
…ngAEDComputer Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
Signed-off-by: andrusenkoau <andrusenkoau@users.noreply.github.com>
Signed-off-by: andrusenkoau <andrusenkoau@gmail.com>
…to canary_streaming_pr
artbataev
approved these changes
Oct 13, 2025
Collaborator
artbataev
left a comment
There was a problem hiding this comment.
Thanks a lot! Great work!
Member
|
Thanks @andrusenkoau LGTM. Excellent work! |
nithinraok
approved these changes
Oct 13, 2025
ko3n1g
approved these changes
Oct 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
The
Update branchbutton 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 decoding policies support (Wait-K and AlignAtt) for Canary model.
Wait-K policy predicts only one token per each new speech chunk that increases the overall latency - original paper. In this case, it is unclear at what point you can forget part of the left context when recognizing with a limited window. It is recommended to set the left context to the maximum possible value (infinite left context) for the waitk policy.
AlignAtt policy predicts tokens according to the cross-attention condition - original paper. If the condition is met, then the audio size does not need to be increased, and the prediction of the next token continues. Otherwise, the audio buffer size needs to be increased. This policy shows lower latency in comparison with waitk. This policy is also suitable for window recognition (left context is fixed and not infinite), but you can lose accuracy in this case.
Collection: [ASR]
Changelog
Usage
Decoding policy is controlled by AEDStreamingDecodingConfig. You can choose waitk or alignatt policy. The remaining parameters (such as alignatt_thr or waitk_lagging) need to be selected depending on the data and the task (for example, for AST, you can increase waitk_lagging, which works for both policies).
Remember to manage prompt parameters using
+prompt(for example,+prompt.pnc=yes/no,+prompt.task=asr/ast,+prompt.source_lang=en,+prompt.target_lang=de, and so on). This is especially important for AST task.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:
PR Type:
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