MaskingMethods.py 文件源码

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

项目:aes_wimp 作者: Js-Mim 项目源码 文件源码
def IBM(self):
        """
            Computation of Ideal Binary Mask.
        Args:
            sTarget:   (2D ndarray) Magnitude Spectrogram of the target component
            nResidual: (2D ndarray) Magnitude Spectrogram of the residual component
        Returns:
            mask:      (2D ndarray) Array that contains time frequency gain values

        """
        print('Ideal Binary Mask')
        theta = 0.5
        mask = np.divide(self._sTarget ** self._alpha, (self._eps + self._nResidual ** self._alpha))
        bg = np.where(mask >= theta)
        sm = np.where(mask < theta)
        mask[bg[0],bg[1]] = 1.
        mask[sm[0], sm[1]] = 0.
        self._mask = mask
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号