fastaudio / fastai2_audio

[DEPRECATED] Audio Module for fastai v2
Apache License 2.0
65 stars 15 forks source link

Resampling to 2000hz and 1000hz breaks with current polyphase resampling method #8

Open rbracco opened 4 years ago

rbracco commented 4 years ago

To replicate add 1000 or 2000 to the cell in the Resample section that iterates over a bunch of rates and resamples to said rates. If a rate below exactly 3000 (all above 3000 work, all below fail) is included, an audio is generated but is unplayable in jupyter. It will appear normal but clicking it does nothing.

image

PranY commented 4 years ago

I just read the code for Resample(), scipy.signal.resample_poly() and scipy.signal.upfirdn() and I felt I need a better understanding of signal processing in general. I still have a question though, do we need to pass the new sampling rate (up) and the old sampling rate(down) to resample_poly or the same divided by the GCD (as implemented).

When I read how the widow size is calculated for FIR between the upsampling and downsampling, the math didn't add up.