pythonaudioresampling

Upsampling Audio data


I have 8Khz data for voice recognition model training, but the model does not support 8Khz, so I want to upsample it to 16Khz. How can I upsample through the scipy library?


Solution

  • This is going to get dirty, fast.

    You need an interpolation filter. It upsamples the input, then low-pass filters it back to the original passband. This preserves the original signal and does not add "interesting" artifacts to it.

    Start by Googling "interpolation filter".

    Good luck. You're going to need it. (Yes, I've been down this route, a little bit, but that was some years ago and the code is most emphatically not releasable.)