Skip to content

improve canary performance on short audio#15317

Merged
pzelasko merged 4 commits intomainfrom
fix_transcription_shorter
Jan 27, 2026
Merged

improve canary performance on short audio#15317
pzelasko merged 4 commits intomainfrom
fix_transcription_shorter

Conversation

@nithinraok
Copy link
Copy Markdown
Member

What does this PR do ?

Fixes: #15305

Fix transcription and timestamps prediction for shorter sequences with canary models when using torch tensor/ numpy array as input

Collection: ASR

Changelog

  • Add min padding of 1sec when using tensor/array as input
  • Pad on both sides (default used in canary models)

Usage

from nemo.collections.asr.models import EncDecMultiTaskModel
model = EncDecMultiTaskModel.from_pretrained("nvidia/canary-1b-v2")

import librosa
audio, sr = librosa.load('<path to audio>', sr=16000)

hypotheses = model.transcribe(
    audio=audio,
    source_lang='fr', target_lang='fr', timestamps=True,
    batch_size=1,
    return_hypotheses=True,
)
print(hypotheses)

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

Signed-off-by: nithinraok <nithinrao.koluguri@gmail.com>
@github-actions github-actions bot added the ASR label Jan 26, 2026
nithinraok and others added 3 commits January 26, 2026 22:50
Signed-off-by: nithinraok <nithinraok@users.noreply.github.com>
Signed-off-by: nithinraok <nithinrao.koluguri@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

[🤖]: Hi @nithinraok 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

//cc @chtruong814 @ko3n1g @pablo-garay @thomasdhc

@github-actions github-actions bot removed the Run CICD label Jan 27, 2026
Copy link
Copy Markdown
Collaborator

@pzelasko pzelasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, LGTM

@pzelasko pzelasko merged commit c6df9b4 into main Jan 27, 2026
139 checks passed
@pzelasko pzelasko deleted the fix_transcription_shorter branch January 27, 2026 13:45
nune-tadevosyan pushed a commit to nune-tadevosyan/NeMo that referenced this pull request Mar 13, 2026
* improve canary performance on short audio

Signed-off-by: nithinraok <nithinrao.koluguri@gmail.com>

* Apply isort and black reformatting

Signed-off-by: nithinraok <nithinraok@users.noreply.github.com>

* revert non canary models

Signed-off-by: nithinraok <nithinrao.koluguri@gmail.com>

---------

Signed-off-by: nithinraok <nithinrao.koluguri@gmail.com>
Signed-off-by: nithinraok <nithinraok@users.noreply.github.com>
Co-authored-by: nithinraok <nithinraok@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting timestamps using NeMo tensor loading

2 participants