-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to save audio in the original format when exporting to shar #1422
Conversation
36e005e
to
abb7fcb
Compare
# 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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pzelasko, including a bugfix here: frequency was not normalized.
test/shar/test_write.py
Outdated
@@ -87,6 +87,7 @@ def test_tar_writer_pipe(tmp_path: Path): | |||
), | |||
], | |||
) | |||
# TODO: check if this should be removed? | |||
def test_audio_tar_writer(tmp_path: Path, format: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well spotted! yes, please remove it. thanks
8dadd01
to
a3e2bf6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks! Let's remove that duplicated test you found and merge.
…hotse-speech#1422) * Option to save audio in the original format when exporting to shar * Removed duplicate test
Added an option to use the original audio format when exporting to shar.
Example
Use
--audio original
when callinglhotse shar export
.For example: