pysamplerate, a package for high quality samplerate convertion
pysamplerate is a python module to do high quality resampling of audio signals, using sinc interpolation. pysamplerate gives you functionalities similar to resample in matlab (the actual resampling method may differ, though), and is intended to be used with numpy arrays.
The above figure plots the error signal for a 1000 Hz sinusoid converted from 44.1 Khz to 48 Khz (compare to an sinusoid directly sampled @ 48 khz). The script used to generate the figure is here: example1.
Download
You can find pysamplerate in tar.gz format or in zip format.
LICENSE
pysamplerate itself is released under a BSD-like license (the same then scipy), but pysamplerate cannot do anything without SRC, which is released under LGPL.
Usage
Hopefully coming soon :) For now, just look at the examples in the archives ! The file example1 should give you a good idea how to use it
TODO:
For now, pysamplerate only constant ratio. But SRC itself is able to do ratio which change overtime. Also, no error reporting is done yet.
Acknowledgments
Please note that pysamplerate is essentially a wrapper around the Sampling Rate Conversion library, aka Source Rabbit Code, the high quality sampling rate convertion library of Erik Castrop de Lopo.