-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hi @jonashaag, thanks for compiling and updating this notebook on resampling libraries! However, I noticed there was a small bug in the new torchaudio examples, and also wanted to update you on some new resampling capabilities from our latest release.
I noticed that there was a bug in the notebook with the torchaudio_new_resample arguments that led to it producing strange plots for both the upsample and downsample examples. Removing [None] and [0] from torchaudio_new_resample(torch.from_numpy(sig[None]), P, Q).numpy()[0] should resolve this issue, and both resampling methods in torchaudio should produce the same results.
In the latest torchaudio release (v0.9.0), we made several improvements to resampling. We improved the speed performance of transforms.Resample, deprecated kaldi.resample_waveform in favor of functional.resample, added kaiser window support, among others. If you're interested, you can track the updates here, and we have also created a tutorial demonstrating the properties of our improved resampling function.
What are your thoughts on the following?
- fixing the
torchaudio_new_resamplebug - using the latest version of torchaudio (
0.9.0) (Note that for the latest version,transforms.Resampleshould take in an additionaldtype=torch.float64argument in your examples) - plotting with a higher quality set of parameters (ex/ using
lowpass_filter_width=64orresampling_method="kaiser_window")
Let me know if you would like to work on this, or if you'd like me to send in a PR, I'd be happy to do so as well!
cc @mthrok