HDL-MIC · Documentation

Noise reduction

The noise reducer implements spectral subtraction in the short-time Fourier transform (STFT) domain. The method reduces the level of stationary additive noise: microphone self-noise, ventilation noise and other background noise with a slowly varying spectrum.

Purpose and scope

Noise reduction is placed in the processing chain after the filter and the equalizer and operates only in streaming mode:

In windowed mode (levels, signal graphs, windowed recording) noise reduction is not applied: the window length is comparable to the settling time of the noise estimate, and the windows are not contiguous. Processing is performed independently for each channel; a stored noise profile is used for all channels.

Signal model

The observed signal is treated as the sum of the useful signal s[n] and additive noise d[n] uncorrelated with the signal:

x[n] = s[n] + d[n];    in the STFT domain: E{|X(m,k)|²} = |S(m,k)|² + λd(k)

m is the frame index, k is the frequency bin index, λd(k) is the noise power spectral density (PSD). The noise is assumed to be stationary: λd(k) changes more slowly than the spectrum of the useful signal.

Analysis and synthesis (STFT)

x[n]→ √Hann window
N samples, hop N/2
→ FFT→ |X(m,k)|²
PSD estimate
→ G(m,k)
bin gain
→ × G→ IFFT→ √Hann window,
overlap-add
→ y[n]

The signal is divided into frames of length N with 50 % overlap (hop R = N/2). The square root of the Hann window is used for analysis and synthesis. The product of the analysis and synthesis windows equals the Hann window, which at 50 % overlap satisfies the constant overlap-add (COLA) condition; therefore with G = 1 the overlap-add (OLA) method reconstructs the signal exactly.

N = 2p ≥ 0.02·fs (N ≥ 256);    Δf = fs/N;    processing delay — N samples
fs = 16,276 Hz: N = 512, Δf = 31.8 Hz, delay 31.5 ms;   fs = 48,828 Hz: N = 1024, Δf = 47.7 Hz, delay 21 ms

Spectral subtraction

For each bin a gain is calculated that corresponds to subtracting the noise power estimate from the power of the observed signal (power spectral subtraction, S. F. Boll, 1979) with an oversubtraction factor α and a spectral floor β (M. Berouti, R. Schwartz, J. Makhoul, 1979):

G(m,k) = max( √(1 − α·λ̂d(k) / P̂x(m,k)),  β ),    Ŝ(m,k) = G(m,k)·X(m,k)
β = 10−R/20,   R — maximum noise attenuation, dB;   α — oversubtraction factor (1…4)

P̂x(m,k) is a recursively smoothed estimate of the observed signal power: P̂x(m,k) = 0.7·P̂x(m−1,k) + 0.3·|X(m,k)|². The ratio P̂x/λ̂d is the a posteriori signal-to-noise ratio (a posteriori SNR) of the bin. At a high ratio G ≈ 1 and the component passes unchanged; at a ratio close to α, G decreases to β. The phase of X(m,k) is not changed.

Fig. 1. Bin gain as a function of the a posteriori signal-to-noise ratio; R = 20 dB, α = 1 and α = 4.

Noise spectrum estimation

“Auto” mode — minimum tracking. A simplified minimum statistics method (R. Martin, 2001) is used. The bin power is smoothed with a time constant greater than the duration of sounds: P̄(m,k) = 0.95·P̄(m−1,k) + 0.05·|X(m,k)|². The noise estimate follows the minimum of P̄: it decreases to P̄ immediately and, when P̄ is above the estimate, increases no faster than 3 dB/s. Since the minimum of the smoothed power is biased downward relative to the mean noise value, the estimate is multiplied by a bias correction factor of 1.5.

Fig. 2. Model of minimum tracking for one bin: noise with a PSD of 0 dB, sound events in the intervals 1.5–2.5 s and 4–4.5 s, a 6 dB increase of the noise level at 6 s. During the events the estimate rises at no more than 3 dB/s and returns to the noise level after they end; an increase of the noise level is tracked at the same rate.

A consequence of the method: a stationary component of the useful signal (for example, a constant-amplitude tone) is included in the noise estimate within a few seconds and suppressed.

“Stored profile” mode. λ̂d(k) is the mean value of P̂x(m,k) over a 2 s interval containing only noise. The profile is recorded with the “Learn noise” command during listening in the absence of the useful signal. The bias correction factor is not applied. The profile is kept between listening sessions as long as fs is unchanged. The mode is used when the useful signal contains stationary components or the noise must be suppressed more strongly.

Smoothing and musical noise

Independent calculation of G(m,k) over frames and bins leads to random short spectral peaks in the residual noise, perceived as tonal artifacts — musical noise. To reduce it, the following are applied:

Parameters

Interface parameterSymbolRangeEffect
Enable—on/offWhen disabled G = 1 (processing is transparent, the delay of N samples remains)
Reduce noise by up toR, β = 10−R/200…40 dBLower bound of G; limits attenuation and distortion
Subtraction strengthα1…4Increasing α increases noise suppression and attenuation of weak signal components
Noise estimateλ̂d(k)auto / stored profileMethod of noise PSD estimation
Learn noise—2 sRecording of the noise profile (during listening)

Parameters are changed during listening without restarting it.

Measurement results

ConditionsResult
Simulated white noise, α = 2, both modesNoise attenuation ≈ 20 dB
Simulated white noise, stored profile, α = 3…4Noise attenuation 28…30 dB
Sinusoid above noise, R = 20 dBSignal level change within ±1 dB
Microphone ch0, quiet room, PSD above 4 kHz, R = 10 / 20 / 30 dB−108 dBFS → −119 / −128 / −138 dBFS

Application and limitations