wsola.py 文件源码

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

项目:sprocket 作者: k2kobayashi 项目源码 文件源码
def _search_minimum_distance(self, ref, buff):
        if len(ref) < self.fl:
            ref = np.r_[ref, np.zeros(self.fl - len(ref))]

        # slicing and windowing one sample by one
        buffmat = view_as_windows(buff, self.fl) * self.win
        refwin = np.array(ref * self.win).reshape(1, self.fl)
        corr = correlate2d(buffmat, refwin, mode='valid')

        return np.argmax(corr) - self.sl
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号