Option to save audio in the original format when exporting to shar#1422
Merged
Conversation
36e005e to
abb7fcb
Compare
anteju
commented
Nov 22, 2024
| # generate 1kHz sine wave | ||
| f_sine = 1000 | ||
| assert f_sine < sampling_rate / 2, "Sine wave frequency exceeds Nyquist frequency" | ||
| data = torch.sin(2 * np.pi * f_sine / sampling_rate * torch.arange(num_samples)) |
Collaborator
Author
There was a problem hiding this comment.
@pzelasko, including a bugfix here: frequency was not normalized.
anteju
commented
Nov 22, 2024
| ], | ||
| ) | ||
| # TODO: check if this should be removed? | ||
| def test_audio_tar_writer(tmp_path: Path, format: str): |
Collaborator
Author
There was a problem hiding this comment.
@pzelasko, this test is repeated twice test_audio_tar_writer, so only the latter is running.
It seems that this (top) version is older, but please check if one should be removed (or renamed if both should be kept).
Collaborator
There was a problem hiding this comment.
well spotted! yes, please remove it. thanks
8dadd01 to
a3e2bf6
Compare
pzelasko
reviewed
Nov 22, 2024
pzelasko
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, thanks! Let's remove that duplicated test you found and merge.
pzelasko
approved these changes
Nov 23, 2024
yfyeung
pushed a commit
to yfyeung/lhotse
that referenced
this pull request
Jan 8, 2025
…hotse-speech#1422) * Option to save audio in the original format when exporting to shar * Removed duplicate test
nshmyrev
pushed a commit
to alphacep/lhotse
that referenced
this pull request
Aug 15, 2025
…hotse-speech#1422) * Option to save audio in the original format when exporting to shar * Removed duplicate test
racoiaws
pushed a commit
to racoiaws/lhotse
that referenced
this pull request
Sep 17, 2025
…hotse-speech#1422) * Option to save audio in the original format when exporting to shar * Removed duplicate test
HsunGong
pushed a commit
to HsunGong/lhotse
that referenced
this pull request
Dec 16, 2025
…hotse-speech#1422) * Option to save audio in the original format when exporting to shar * Removed duplicate test
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.
Added an option to use the original audio format when exporting to shar.
Example
Use
--audio originalwhen callinglhotse shar export.For example: