示例#1
0
文件: plot.py 项目: romanz/amodem
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()
示例#2
0
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()
示例#3
0
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))
示例#4
0
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))