Denoising Audio Signals Using MATLAB
Denoising Audio Signals Using MATLAB
Problem Statement
Theory
2.1
Spectral Subtraction
Spectral subtraction method is a well known noise reduction method. The basic
power spectral subtraction technique, as proposed by Boll, is popular due to its
simple underlying concept and its effectiveness in enhancing speech degraded
by additive noise. The basic principle is as follows: if we assume additive noise,
then we can subtract the noise spectrum from the noisy speech spectrum, so we
are left with what should look like the clean speech spectrum. For this we need
to know what the noise spectrum looks like, so we estimate it during regions of
no speech (parts of the signal that contain only noise) and then assume it wont
change much from frame to frame.
This technique is applicable when the noise is available separately. In practical
applications this technique can be used by recording the noisy environment
seperately to obtain an estimate of the noise.
The steps involved in this method are as follows:
The first step in spectral subtraction is to frame the speech signal into
short, overlapping frames. Typically frames are taken to be about 20ms
long. For a 16kHz sampled audio file, this corresponds to 0.020s * 16,000
samples/s = 400 samples in length. We then use an overlap of 50 percent,
or about 200 samples. This means the first frame starts at sample 0, the
second starts at sample 200, the third at 400 etc.
We would usually window each frame using e.g. the hamming window.
We then take the discrete fourier transform of each frame and extract the
magnitude and phase spectrum from each.
A common assumption is that the first few frames of an audio signal consist
of silence, so they should be good examples of the noise spectrum. To get
our noise estimate, we can take the mean of the first 3 or so frames.
Now that we have the magnitude for each frame and a noise estimate, we
can proceed with the meat of spectral subtraction: subtracting the noise
estimate.
Next we do the IFFT (inverse FFT) and do overlap add of the resulting
time-domain frames to reconstruct our original signal.
2.2
Time-frequency audio-denoising procedures compute a short-time Fourier transform or a wavelet transform or a wavelet packet transform of the noisy signal,
and processes the resulting coefficients to attenuate the noise. These representations reveal the time-frequency signal structures that can be discriminated
from the noise.
Thresholding gives amplitude separation. To separate signal and noise, thresholding is used. The purpose of a filter is for frequency separation and frequency signal restoration. So for amplitude separation thresholding is used.
Depending upon the type of noise present in the signal,the thresholding is determined basically in two forms; Soft Thresholding and Hard Thresholding. In
Soft thresholding the coefficients which are within the Threshold value are considered as zero and subtract the Threshold value from the coefficients which
are above the Threshold value. In Hard Thresholding , the coefficients which
are within the Threshold value are consider as zero and the coefficients which
are above the Threshold value remain same and are considered as actual coefficients of the signal. In this study, we adopt the hard thresholding method.
In practice, the problem is to choose the threshold value, because the amount
3
of noise is usually not known a priori. If the threshold is too small, the noise
will not be efficiently removed. If it is too large, the signal will be distorted.
Observations
Following were the observations made for Spectral Subtraction on a noisy speech
signal.
However, for an audio sample corrupted with fairly loud AWGN noise, we were
unable to achieve the desired output.
This problem was overcome by using the Time Frequency Block Thresholding
algorithm.
Results
References
[1] Steven F. Boll Suppression of Acoustic Noise in Speech Using Spectral Subtraction, IEEE Transactions on Signal Processing, 27(2),pp 113-120, 1979
[2] G. Yu, S. Mallat, E. BacryAudio Denoising by Time-Frequency Block
Thresholding,IEEE Trans. on Signal Processing, vol 56, no. 5, pp. 18301839, May 2008