SoundUtils.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:PyPeVoc 作者: goiosunsw 项目源码 文件源码
def Heterodyn(x, f, sr=1, nwind=1024, nhop=512,
              windfunc=np.blackman):
    '''
    Calculates the amplitude near frequency f in x

    nwind should be at least 3 periods if the signal is periodic.
    '''
    sinsig = np.exp(2j*np.pi*np.arange(len(x))*f/float(sr))
    hamp, t = FuncWind(np.sum, x*sinsig, power=1, sr=sr,
                       nwind=nwind, nhop=nhop,
                       windfunc=windfunc)
    return np.array(hamp)*2, np.array(t)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号