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
评论列表
文章目录