Skip to content

Fix audio tensor loading canary2#15265

Merged
pzelasko merged 3 commits intomainfrom
fix_audio_tensor_loading_canary2
Jan 7, 2026
Merged

Fix audio tensor loading canary2#15265
pzelasko merged 3 commits intomainfrom
fix_audio_tensor_loading_canary2

Conversation

@nithinraok
Copy link
Copy Markdown
Member

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 ?

Fixes issue with transcribing with canary2 model on numpy array or torch tensor input

Collection: ASR

Changelog

Couple of issues:

  • when not using lhotse sampler, we replace prompt with default slots on the go. which returning user_partial too (Causing double user input)
  • when chunking is enable audio_id is not captured.

Usage

from nemo.collections.asr.models import EncDecMultiTaskModel
model = EncDecMultiTaskModel.from_pretrained("nvidia/canary-1b-v2")
audio, sr = librosa.load(<audio_path>, sr=16000)
audio_tensor = torch.from_numpy(audio)

hypotheses = model.transcribe(
    audio=audio,
    batch_size=1,
    return_hypotheses=True,
)
print(hypotheses[0].text)

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: nithinraok <nithinrao.koluguri@gmail.com>
Signed-off-by: nithinraok <nithinrao.koluguri@gmail.com>
@nithinraok
Copy link
Copy Markdown
Member Author

Fixes #14918

Signed-off-by: nithinraok <nithinraok@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 7, 2026

[🤖]: 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

@nithinraok nithinraok requested a review from pzelasko January 7, 2026 17:50
@pzelasko pzelasko merged commit bf583c9 into main Jan 7, 2026
276 of 281 checks passed
@pzelasko pzelasko deleted the fix_audio_tensor_loading_canary2 branch January 7, 2026 19:12
AkCodes23 pushed a commit to AkCodes23/NeMo that referenced this pull request Jan 28, 2026
* update default promt slot

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

* add test case

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

* Apply isort and black reformatting

Signed-off-by: nithinraok <nithinraok@users.noreply.github.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>
Signed-off-by: Akhil Varanasi <akhilvaranasi23@gmail.com>
nune-tadevosyan pushed a commit to nune-tadevosyan/NeMo that referenced this pull request Mar 13, 2026
* update default promt slot

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

* add test case

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

* Apply isort and black reformatting

Signed-off-by: nithinraok <nithinraok@users.noreply.github.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants