utils.py 文件源码

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

项目:sourceseparation_misc 作者: ycemsubakan 项目源码 文件源码
def mag2spec_and_audio(xhat, MSphase, arguments):

    MSphase = MSphase.cpu().numpy()
    Nmix = MSphase.shape[0]
    mags = np.split(xhat, Nmix, axis=0) 
    phases = np.split(MSphase, Nmix, axis=0)

    all_audio = []
    for mag, phase in zip(mags, phases):
        all_audio.append(lr.istft((mag*np.exp(1j*phase.squeeze())).transpose(), 
                                  win_length=arguments.win_length))

    return all_audio, mags
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号