microsoft / DNS-Challenge

This repo contains the scripts, models, and required files for the Deep Noise Suppression (DNS) Challenge.
Creative Commons Attribution 4.0 International
1.09k stars 411 forks source link

segmental_snr_mixed bug? #94

Open SiyuanWei opened 2 years ago

SiyuanWei commented 2 years ago

image While the clean audio and noise audio have already been normalized based on the RMS, I'm wondering that whether the noisescalar should be multiplied by rms_clean/ rms_noise..

anteju commented 2 years ago

@motus, @hdubey: The above is almost definitely a bug, causing wrong SNR in the noisyspeech signal

noisyspeech = clean + noisenewlevel

As pointed out above, and also in #53, noise scaling in noisescalar is calculated using rmsclean and rmsnoise. However, both clean and noise have already been normalized to target_level. Therefore, the final scaled noise noisenewlevel will not have the correct level.

This can be easily tested by running segmental_snr_mixer with inputs clean and noise with different distributions, for example,

clean = np.random.rand(N) - 0.5
noise = np.random.randn(N)

This may have a significant impact on the SNR distribution in the generated data and on analysis of the results.

haozh7109 commented 1 year ago

I agree with @anteju, this is definitely a bug that needs to be fixed. Otherwise, the resulting generated noisy data will have incorrect SNR.