def main(): config = Configuration() for fname in sys.argv[1:]: x = common.load(open(fname, 'rb')) t = np.arange(len(x)) * config.Ts pylab.figure() pylab.title(fname) spectrogram(t, x, config.Fs) pylab.show()
def resample(src, dst, df=0.0): x = common.load(src) sampler = Sampler(x, Interpolator()) sampler.freq += df y = sampler.take(len(x)) dst.write(common.dumps(y))