def ideal_ratio_mask(noisy_speech, clean_speech, sr):
win_len = sr * 0.02
shift_len = sr * 0.01
noisy_spect = stft_extractor(noisy_speech, win_len, shift_len, 'hanning')
clean_spect = stft_extractor(clean_speech, win_len, shift_len, 'hanning')
irm = np.abs(clean_spect) / np.abs(noisy_spect)
return irm
评论列表
文章目录