A Hybrid DSP/Deep Learning Approach toReal-Time Full-Band Speech Enhancement
Jean-Marc Valin
Mozilla Corporation
Mountain View, CA, USA
jmvalin@jmvalin.ca

Abstract—Despite noise suppression being a mature area insignal processing, it remains highly dependent on fine tuningof estimator algorithms and parameters. In this paper, wedemonstrate a hybrid DSP/deep learning approach to noise
suppression. We focus strongly on keeping the complexity as low
as possible, while still achieving high-quality enhanced speech. A
deep recurrent neural network with four hidden layers is used
to estimate ideal critical band gains, while a more traditional
pitch filter attenuates noise between pitch harmonics. The approach achieves significantly higher quality than a traditional
minimum mean squared error spectral estimator, while keeping
the complexity low enough for real-time operation at 48 kHz on
a low-power CPU.
Index Terms—noise suppression, recurrent neural network

I. I NTRODUCTION
Noise suppression has been a topic of interest since at least
the 70s. Despite significant improvements in quality, the highlevel structure has remained mostly the same. Some formof spectral estimation technique relies on a noise spectral
estimator, itself driven by a voice activity detector (VAD) or
similar algorithm, as shown in Fig. 1. Each of the 3 components requires accurate estimators and are difficult to tune. For
example, the crude initial noise estimators and the spectral estimators based on spectral subtraction [1] have been replaced bymore accurate noise estimators [2], [3] and spectral amplitude
estimators [4]. Despite the improvements, these estimators
have remained difficult to design and have required significant
manual tuning effort. That is why recent advances in deeplearning techniques are appealing for noise suppression.
Deep learning techniques are already being used for noise
suppression [5], [6], [7], [8], [9]. Many of the proposed
approaches target automatic speech recognition (ASR) applications, where low latency is not required. Also, in many cases,
the large size of the neural network makes a real-time implementation difficult without a GPU. In the proposed approach
we focus on real-time applications (e.g. video-conference)with low complexity. We also focus on full-band (48 kHz)speech. To achieve these goals we choose a hybrid approach(Sec. II), where we rely on proven signal processing techniques
and use deep learning (Sec. III) to replace the estimators thathave traditionally been hard to correctly tune. The approachcontrasts with so-called end-to-end systems where most or allof the signal processing operations are replaced by machinelearning. These end-to-end system have clearly demonstrated

Noisy
SignalVoice Activity
Detection

when toadapt

Noise Spectral
Estimation

what tosubtract

Spectral
Subtraction

optional: when to muteDenoised
SignalFigure 1. High-level structure of most noise suppression algorithms.

the capabilities of deep learning, but they often come at thecost of significantly increased complexity.
We show that the proposed approach has an acceptable complexity (Sec. IV) and that it provides better quality than moreconventional approaches (Sec. V). We conclude in Sec. VI
with directions for further improvements to this approach.
II. S IGNAL M ODELWe propose a hybrid approach to noise suppression. The
goal is to use deep learning for the aspects of noise suppressionthat require careful tuning while using basic signal processingbuilding blocks for parts that do not.
The main processing loop is based on 20 ms windows with
50% overlap (10 ms offset). Both analysis and synthesis use
the same Vorbis window [10], which satisfies the PrincenBradley criterion [11]. The window is defined ashπ
 πn iw (n) = sin
sin2
,
(1)
2
N
where N is the window length.
The signal-level block diagram for the system is shownin Fig. 2. The bulk of the suppression is performed on a
low-resolution spectral envelope using gains computed froma recurrent neural network (RNN). Those gains are simply thesquare root of the ideal ratio mask (IRM). A finer suppression
step attenuates the noise between pitch harmonics using a pitch
comb filter.

InputOverlapped
window

Pitch analysis

OutputWindow
Overlap-add

Featureextraction

FFT

IFFT

Pitch filtering

RNN

X

Band gaininterpolation

Figure 2. Block diagram.

A. Band structure
In the approach taken by [5], a neural network is used todirectly estimate magnitudes of frequency bins and requiresa total of 6144 hidden units and close to 10 million weights
to process 8 kHz speech. Scaling to 48 kHz speech using 20ms frames would require a network with 400 outputs (0 to
20 kHz), which clearly results in a higher complexity than we
can afford.
One way to avoid the problem is to assume that the spectralenvelopes of the speech and noise are sufficiently flat to usea coarser resolution than frequency bins. Also, rather thandirectly estimating spectral magnitudes, we instead estimate
ideal critical band gains, which have the significant advantage
of being bounded between 0 and 1. We choose to divide thespectrum into the same approximation of the Bark scale [12]as the Opus codec [13] uses. That is, the bands follow the
Bark scale at high frequencies, but are always at least 4 bins
at low frequencies. Rather than rectangular bands, we use
triangular bands, with the peak response being at the boundary
between bands. This results in a total of 22 bands. Our network
therefore requires only 22 output values in the [0, 1] range.
LetP
wb (k) be the amplitude of band b at frequency k, wehaveb wb (k) = 1. For a transformed signal X (k), theenergy in a band is given byX
2
E (b) =wb (k) |X (k)| .
(2)kThe per-band gain is defined as gbs
Es (b),gb =Ex (b)(3)

where Es (b) is the energy of the clean (ground truth) speech
and Ex (b) is the energy of the input (noisy) speech. Considering an ideal band gain ĝb , the following interpolated gain isapplied to each frequency bin k:Xr (k) =wb (k) ĝb .
(4)b

B. Pitch filtering
The main disadvantage of using Bark-derived bands tocompute the gain is that we cannot model finer details inthe spectrum. In practice, this prevents noise suppression
between pitch harmonics. As an alternative, we can use a comb
filter at the pitch period to cancel the inter-harmonic noise
in a similar way that speech codec post-filters operate [14].
Since the periodicity of speech signal depends heavily onfrequency (especially for 48 kHz sampling rate), the pitch
filter operates in the frequency domain based on a per-band
filtering coefficient αb . Let P (k) be the windowed DFT ofthe pitch-delayed signal x (n − T ), the filtering is performedby computing X (k) + αb P (k) and then renormalizing theresulting signal to have the same energy in each band as theoriginal signal X (k).
The pitch correlation for band b is defined asP∗
k wb (k) < [X (k) P (k)],(5)
pb = qP
2 P
2
w
(k)
|X
(k)|
·
w
(k)
|P
(k)|
b
b
k
k
where < [·] denotes the real part of a complex value and ·∗denotes the complex conjugate. Note that for a single band,(5) would be equivalent to the time-domain pitch correlation.
Deriving the optimal values for the filtering coefficient αb
is hard and the values that minimize mean squared error are
not perceptually optimal. Instead, we use a heuristic based on
the following constraints and observations. Since noise causes
a decrease in the pitch correlation, we do not expect pb to begreater than gb on average, so for any band that has pb ≥ gb ,we use αb =1 . When there is no noise, we do not want todistort the signal, so when gb = 1, we use αb = 0. Similarly,
when pb = 0, we have no pitch to enhance, so αb = 0. Using
the following expression for the filtering coefficient respects
all these constraints with smooth behavior between them:s!
p2b (1 − gb2 )
, 1 .
(6)
αb = min(1 − p2b ) gb2
Even though we use an FIR pitch filter here, it is also
possible to compute P (k) based
 on an IIR pitch filter of theform H(z) = 1/ 1 − βz −T , resulting in more attenuation
between harmonics at the cost of slightly increased distortion.
C. Feature extraction
It only makes sense for the input of the network to include
the log spectrum of the noisy signal based on the same bands
used for the output. To improve the conditioning of the training
data, we apply a DCT on the log spectrum, which results in
22 Bark-frequency cepstral coefficients (BFCC). In addition tothese, we also include the temporal derivative and the second
temporal derivative of the first 6 BFCCs. Since we alreadyneed to compute the pitch in (5), we compute the DCT of thepitch correlation across frequency bands and include the first
6 coefficients in our set of features. At last, we include thepitch period as well as a spectral non-stationarity metric that
can help in speech detection. In total we use 42 input features.
Unlike the features typically used in speech recognition,these features do not use cepstral mean normalization and doinclude the first cepstral coefficient. The choice is deliberate
given that we have to track the absolute level of the noise, but

Input features (42)

Dense tanh (24)

GRU ReLU (24)Dense sig. (1)GRU ReLU (48)

Voiceactivity
detection

Noise
spectralestimation

GRU ReLU (96)Spectralsubtraction

VAD output (1)Dense sig. (22)

Gains outputs (22)Figure 3. Architecture of the neural network, showing the feed-forward, fully
connected (dense) layers and the recurrent layers, along with the activation
function and the number of units for each layer.

it does make the features sensitive to the absolute amplitudeof the signal and to the channel frequency response. This isaddressed in Sec. III-A.
III. D EEP L EARNING A RCHITECTURE
The neural network closely follows the traditional structureof noise suppression algorithms, as shown in Fig. 3. The designis based on the assumption that the three recurrent layers areeach responsible for one of the basic components from Fig. 1.
Of course, in practice the neural network is free to deviate fromthis assumption (and likely does to some extent). It includes a
total of 215 units, 4 hidden layers, with the largest layer having
96 units. We find that increasing the number of units does
not significantly improve the quality of the noise suppression.
However, the loss function and the way we construct thetraining data have a large impact on the final quality. We
find that gated recurrent unit (GRU) [15] slightly outperforms
LSTM on this task, while also being simpler.
Despite the fact that it is not strictly necessary, the network
includes a VAD output. The extra complexity cost is very small(24 additional weights) and it improves training by ensuringthat the corresponding GRU indeed learns to discriminate
speech from noise.
A. Training data
Since the ground truth for the gains requires both the noisy
speech and the clean speech, the training data has to be constructed artificially by adding noise to clean speech data. For
speech data, we use the McGill TSP speech database1 (French
and English) and the NTT Multi-Lingual Speech Database forTelephonometry2 (21 languages). Various sources of noise areused, including computer fans, office, crowd, airplane, car,train, construction. The noise is mixed at different levels to
produce a wide range of signal-to-noise ratios, including clean
speech and noise-only segments.
Since we do not use cepstral mean normalization, we use
data augmentation to make the network robust to variations infrequency responses. This is achieved by filtering the noise andspeech signal independently for each training example using
a second order filter of the form
1 + r1 z −1 + r2 z −2,
(7)
H(z) =
1 + r3 z −1 + r4 z −2
where each of r1 . . . r4 are random values uniformly distributed in the − 83 , 38 range. Robustness to the signal amplitude is achieved by varying the final level of the mixed
signal.
We have a total of 6 hours of speech and 4 hours ofnoise data, which we use to produce 140 hours of noisy
speech by using various combinations of gains and filters andby resampling the data to frequencies between 40 kHz and
54 kHz.
B. Optimization process
The loss function used for training determines how the
network weighs excessive attenuation versus insufficient attenuation when it cannot exactly determine the correct gains.
Although it is common to use the binary cross-entropy function when optimizing for values in the [0, 1] range, this does
not produce good results for the gains because it does notmatch their perceptual effect. For a gain estimate ĝb and thecorresponding ground truth gb , we instead train with the loss
function2
L (gb , ĝb ) = (gbγ − ĝbγ ) ,(8)where the exponent γ is a perceptual parameter that controlsγ
how aggressively to suppress noise. Since limγ→0 x γ−1 =log (x), limγ→0 L (gb , ĝb ) minimizes the mean-squared error
on the log-energy, which would make the suppression too
aggressive given the lack of a floor on the gain. In practice, thevalue γ = 1/2 provides a good trade-off and is equivalent tominimizing the mean squared error on the energy raised to thepower 1/4. Sometimes, there may be no noise and no speech
in a particular band. This is common either when the input issilent or at high frequency when the signal is low-pass filtered.
When that happens, the ground truth gain is explicitly marked
as undefined and the loss function for that gain is ignored to
avoid hurting the training process.
For the VAD output of the network, we use the standard
cross-entropy loss function. Training is performed using theKeras3 library with the Tensorflow4 backend.
C. Gain smoothing
When using the gains ĝb to suppress noise, the output signal
can sometimes sound overly dry, lacking the minimum ex2 The 44.1 kHz audio CD tracks are used rather than the 16 kHz data files.
3 https://keras.io/

1 http://www-mmsp.ece.mcgill.ca/Documents/Data/

4 https://www.tensorflow.org/

Figure 4. Example of noise suppression for babble noise at 15 dB SNR. Spectrogram of the noisy (top), denoised (middle), and clean (bottom) speech. For
the sake of clarity, only the 0-12 kHz band is shown.

pected level of reverberation. The problem is easily remedied
by limiting the decay of ĝb across frames. The smoothed gains
g̃b are obtained as(prev)g̃b = max λg̃b
, ĝb ,
(9)
(prev)

where g̃bis the filtered gain of the previous frame andthe decay factor λ = 0.6 is equivalent to a reverberation timeof 135 ms.
IV. C OMPLEXITY A NALYSIS
To make it easy to deploy noise suppression algorithms,
it is desirable to keep both the size and the complexity low.
The size of the executable is dominated by the 87,503 weights
needed to represent the 215 units in the neural networks. To
keep the size as small as possible, the weights can be quantizedto 8 bits with no loss of performance. This makes it possible
to fit all weights in the L2 cache of a CPU.
Since each weight is used exactly once per frame
in a multiply-add operation, the neural network requires
175,000 floating-point operations (we count a multiply-add

as two operations) per frame, so 17.5 Mflops for real-timeuse. The IFFT and the two FFTs per frame require around
7.5 Mflops and the pitch search (which operates at 12 kHz)requires around 10 Mflops. The total complexity of the algorithm is around 40 Mflops, which is comparable to that of afull-band speech coder.
A non-vectorized C implementation of the algorithm requires around 1.3% of a single x86 core (Haswell i7-4800MQ)
to perform 48 kHz noise suppression of a single channel.
The real-time complexity of the same floating-point code on
a 1.2 GHz ARM Cortex-A53 core (Raspberry Pi 3) is 14%.
As a comparison, the 16 kHz speech enhancement approachin [9] uses 3 hidden layers, each with 2048 units. Thisrequires 12.5 million weights and results in a complexity of1600 Mflops. Even if quantized to 8 bits, the weights do not
fit the cache of most CPUs, requiring around 800 MB/s ofmemory bandwidth for real-time operation.
V. R ESULTS
We test the quality of the noise suppression using speechand noise data not used in the training set. We compareBabble noise

Babble
Car
noise
noise

BabbleCar
Street
noise
noise
noise

4.5

4.5

4

4

4

3.5

3.5

3.5

2.5
2
1.5

3

MOS-LQO

3

MOS-LQO

MOS-LQO

4.5

2.5
2
1.5

3
2.5
2
1.5

1

1

1

0.5

0.5

0.5

0

0
0

5

10

15

20

clean

0
0

5

SNR (dB)
RNNoise

MMSE

10

15

20

clean

0

5

SNR (dB)
Noisy

RNNoise

MMSE

10

15

20

clean

SNR (dB)
Noisy

RNNoise

MMSE

Noisy

Figure 5. PESQ MOS-LQO quality evaluation for babble, car, and street noise.

it to the MMSE-based noise suppressor in the SpeexDSP
library5 . Although the noise suppression operates at 48 kHz,the output has to be resampled to 16 kHz due to the limitationsof wideband PESQ [16]. The objective results in Fig. 5
show a significant improvement in quality from the use ofdeep learning, especially for non-stationary noise types. The
improvement is confirmed by casual listening of the samples.
Fig. 4 shows the effect of the noise suppression on an example.
An interactive demonstration of the proposed system isavailable at https://people.xiph.org/~jm/demo/rnnoise/, including a real-time Javascript implementation. The software implementing the proposed system can be obtained under a BSD
license at https://github.com/xiph/rnnoise/ and the results were
produced using commit hash 91ef401.
VI. C ONCLUSION
This paper demonstrates a noise suppression approach thatcombines DSP-based techniques with deep learning. By using
deep learning only for the aspects of noise suppression thatare hard to tune, the problem is simplified to computing only
22 ideal critical band gains, which can be done efficiently
using few units. The coarse resolution of the bands is thenaddressed by using a simple pitch filter. The resulting low
complexity makes the approach suitable for use in mobile
or embedded devices and the latency is low enough foruse in video-conferencing systems. We also demonstrate thatthe quality is significantly higher than that of a pure signal
processing-based approach.
We believe that the technique can be easily extended toresidual echo suppression, for example by adding to the input
features the cepstrum of the far end signal or the filtered farend signal. Similarly, it should be applicable to microphonearray post-filtering by augmenting the input features withleakage estimates like in [17].
5 https://www.speex.org/downloads/

R EFERENCES[1] S. Boll, “Suppression of acoustic noise in speech using spectral
subtraction,” IEEE Transactions on acoustics, speech, and signal
processing, vol. 27, no. 2, pp. 113–120, 1979.
[2] H.-G. Hirsch and C. Ehrlicher, “Noise estimation techniques for robust
speech recognition,” in Proc. ICASSP, 1995, vol. 1, pp. 153–156.
[3] T. Gerkmann and R.C. Hendriks, “Unbiased MMSE-based noise
power estimation with low complexity and low tracking delay,” IEEE
Transactions on Audio, Speech, and Language Processing, vol. 20, no.
4, pp. 1383–1393, 2012.
[4] Y. Ephraim and D. Malah, “Speech enhancement using a minimum
mean-square error log-spectral amplitude estimator,” IEEE Transactions
on Acoustics, Speech, and Signal Processing, vol. 33, no. 2, pp. 443–
445, 1985.
[5] A. Maas, Q.V. Le, T.M. O’Neil, O. Vinyals, P. Nguyen, and A.Y. Ng,“Recurrent neural networks for noise reduction in robust ASR,” in Proc.
INTERSPEECH, 2012.
[6] D. Liu, P. Smaragdis, and M. Kim, “Experiments on deep learningfor speech denoising,” in Proc. Fifteenth Annual Conference of theInternational Speech Communication Association, 2014.
[7] Y. Xu, J. Du, L.-R. Dai, and C.-H. Lee, “A regression approach to speechenhancement based on deep neural networks,” IEEE Transactions on
Audio, Speech and Language Processing, vol. 23, no. 1, pp. 7–19, 2015.
[8] A. Narayanan and D. Wang, “Ideal ratio mask estimation using deepneural networks for robust speech recognition,” in Proc. ICASSP, 2013,
pp. 7092–7096.
[9] S. Mirsamadi and I. Tashev, “Causal speech enhancement combining
data-driven learning and suppression rule estimation.,” in Proc. INTERSPEECH, 2016, pp. 2870–2874.
[10] C. Montgomery, “Vorbis I specification,” 2004.
[11] J. Princen and A. Bradley, “Analysis/synthesis filter bank design basedon time domain aliasing cancellation,” IEEE Tran. on Acoustics, Speech,
and Signal Processing, vol. 34, no. 5, pp. 1153–1161, 1986.
[12] B.C.J. Moore, An introduction to the psychology of hearing, Brill, 2012.
[13] J.-M. Valin, G. Maxwell, T. B. Terriberry, and K. Vos, “High-quality,
low-delay music coding in the Opus codec,” in Proc. 135th AES
Convention, 2013.
[14] Juin-Hwey Chen and Allen Gersho, “Adaptive postfiltering for quality
enhancement of coded speech,” IEEE Transactions on Speech and Audio
Processing, vol. 3, no. 1, pp. 59–71, 1995.
[15] K. Cho, B. Van Merriënboer, D. Bahdanau, and Y. Bengio, “On theproperties of neural machine translation: Encoder-decoder approaches,”in Proc. Eighth Workshop on Syntax, Semantics and Structure in
Statistical Translation (SSST-8), 2014.
[16] ITU-T, Perceptual evaluation of speech quality (PESQ): An objective
method for end-to-end speech quality assessment of narrow-band telephone networks and speech codecs, 2001.
[17] J.-M. Valin, J. Rouat, and F. Michaud, “Microphone array post-filter for
separation of simultaneous non-stationary sources,” in Proc. ICASSP,
2004.