# How to detect continuous noise in audio call?

We want to detect bad audio quality in audio call.

Should we extract this information from amplitude or frequency spectrum ? Is there any technique/transform/filter available for this ?

Example:

I am attaching two signal graph(Clean Signal vs Noisy One) of Amplitude vs time.

Clean Signal Graph:

Noisy Signal Graph:

As shown in above graph, there is a continuous noise in background in Noisy signal.

How can it be differentiated between this two signal ?

• Welcome to DSP.SE! This question is a very broad one and hard to give a definitive answer. Would you mind coming back with some examples of what you mean, and asking questions about those? Adding more information, regardless, would improve our ability to give you some help. – Peter K. Oct 11 '17 at 11:22
• one has a larger dynamic range than the other. another metric to compute is the whiteness (from the autocorrelation) of the low-level portion. (but your silence in the clean signal might also be white, i dunno.) – robert bristow-johnson Oct 8 '18 at 15:24
• There are standards for that kind of thing. It is probably better to implement one of the standards than to make up your own quality criteria. – JRE Oct 9 '18 at 10:44

My recommendation would be to do the processing in the frequency domain as methods are available that can directly be used to approach your problem. In many cases, speech "quality" is related to the signal-to-noise ratio (SNR) of the signal. At least, I assume this is the case for your application - i.e., telephone communication. In general, some measure for the "quality" can be derived from the SNR then with low SNR indicating "bad quality" and, conversely, high SNR indicating "good quality".

One approach to solve your problem would hence be to try and estimate SNR of the recording. In order to estimate the SNR, well-known noise power spectral density (PSD) estimation algorithms such as, e.g., the "minimum statistics" algorithm [1] or a minimum mean-square error based algorithm [2] can be used. An estimate for the SNR can then be computed from the noise PSD as

$$\hat{\text{SNR}} = \frac{P_{xx}}{\hat{P}_{nn}}-1,$$

with $$P_{xx}$$ the PSD of the noisy input signal and $$\hat{P}_{nn}$$ an estimate of the noise PSD. A single SNR estimate can be computed for the complete signal, but as the SNR changes strongly over time, it might be useful to compute an SNR estimate for short blocks of the signal - typical block lengths are in the order of $$20\,$$-$$30\,\text{ms}$$.

Instead of first estimating the noise PSD, the SNR can be estimated directly, e.g., with the method proposed in [3].

Alternatively, some non-intrusive (i.e., no clean reference signal is required) measure for either the speech quality or the speech intelligiblity can be used. You could try the speech-to-reverberation modulation energy ratio measure [4], of which implementations in Python and MATLAB are directly available.

### References

[1] Rainer Martin, “Noise Power Spectral Density Estimation Based on Optimal Smoothing and Minimum Statistics,” IEEE Transactions on Speech and Audio Processing, vol. 9, no. 5, pp. 504–512, Jul. 2001. PDF MATLAB implementation

[2] T. Gerkmann and R. C. Hendriks, “Unbiased MMSE-Based Noise Power Estimation With Low Complexity and Low Tracking Delay,” Audio, Speech, and Language Processing, IEEE Transactions on, vol. 20, no. 4, pp. 1383–1393, May 2012. PDF MATLAB implementation

[3] E. Nemer, R. Goubran, and S. Mahmoud, “SNR Estimation of Speech Signals using Subbands and Fourth-Order Statistics,” IEEE Signal Processing Letters, vol. 6, no. 7, pp. 171–174, Jul. 1999. IEEE Xplore

[4] T. H. Falk, C. Zheng, and W. Y. Chan, “A Non-Intrusive Quality and Intelligibility Measure of Reverberant and Dereverberated Speech,” IEEE Transactions on Audio, Speech, and Language Processing, vol. 18, no. 7, pp. 1766–1774, Sep. 2010. IEEE Xplore Python implementation MATLAB implementation

You can compute energy and the fft over short consecutive time frames. If the frequency content and the energy does not change during a given number of frames maybe you can assume that you are in the presence of noise. (Considering that you have voice over a white noise corrupted channel)