[audio codec] Add support for Lhotse training format#15622
Merged
Conversation
rfejgin
commented
Apr 23, 2026
rfejgin
commented
Apr 23, 2026
rlangman
reviewed
Apr 23, 2026
Signed-off-by: Fejgin, Roy <rfejgin@nvidia.com>
Collaborator
Author
|
I've addressed the PR comments. Apologies, but the commit history is lost because I needed to force-push to repair some unsigned commits that were blocking CI from running. |
blisc
previously approved these changes
Apr 28, 2026
rlangman
previously approved these changes
Apr 28, 2026
To be more descriptive. Signed-off-by: Fejgin, Roy <rfejgin@nvidia.com>
Contributor
|
[🤖]: Hi @rfejgin 👋, 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. |
blisc
approved these changes
Apr 29, 2026
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.
This PR adds a Lhotse data loader for audio codec training. It also introduces mechanisms to make the training process more stable and to help debug potential
NaNissues.Data Loading
The functionality is split between built-in Lhotse capabilities and a simple custom dataset class.
Lhotse
These operations are handled directly in Lhotse:
n_samples).n_samplesfrom the cut.Configuring Lhotse happens in
AudioCodecModel._get_lhotse_dataloader().AudioCodecLhotseDatasetThe custom dataset class,
AudioCodecLhotseDataset, receives aCutSetfrom Lhotse and performs the following:output_sample_rate.Training Robustness
When training models on Lhotse datasets, we observed convergence similar to the previous training recipe. However, in one instance (out of ~4 training runs), the training ran into
NaNs. To help debug this issue if it ever reoccurs and to stabilize training, the following mechanisms were added:NaNor infinite values. It also warns if suspicious sample values (abs(sample) > 1.5) are encountered.NaNgradient norm is detected, it triggers a warning and skips the current parameter update.Additional notes