# Pre-emphasizing in speech recognition

Usually, in speech recognition, the techniques that are used are based on the linear prediction model (Fant, 1960).

Parallel to this, the human speech production mechanism causes energy to drop across frequencies resulting in less information in the acoustic model. Especially, higher frequencies will have less energy compared to the lower ones, thus, getting poor results with the linear prediction model.

To cope with this, a high pass filter is applied on the signal in order to enhance these components and obtain a much evenly distributed spectrum. This is called the pre-emphasizing step.

I am working with Essentia (essentia.upf.edu) a library for audio analysis. I am using a pre-emphasize filter which is given by:

$x′(t)=x(t)−\alpha\times x(t−1)$

I construct a filter with the following parameters:

• numerator = [1 0]
• denominator = [1, $\alpha$], where $\alpha$ = 0.97

which correspond to the parameters of the transfer function in the Z domain of the above filter.

The following figure shows the spectrum of an audio frame (512 samples) and its filtered version.

I have two questions:

• I am not seeing much enhancement in the high frequency components of the filtered spectrum, so is it looking like an expected result of this step (pre-emphasizing)?
• How can I find an optimal cut-off frequency to design a more accurate filter? Is there, for example, a more robust pre-emphasizing technique that readjust the value of the cut-off frequency according to the frequency distribution of the given spectrum?

Here is the source code:

import essentia.standard as std

f = std.FrameGenerator(audio, frameSize=512, hopSize=128, startFromZero=True)
s = std.Spectrum()
w = std.Windowing(type='hann')

specs = []
for frame in f:
specs.append(s(w(frame))

filter = filter = std.IIR(denominator=[1, 0.97], numerator=[1, 0])

plot(specs[100], label="spectrum")
plot(filter(specs[100]), label="filtered spectrum")

• A discrete-time pre-emphasis filter is usually defined by the input/output relation $y[n]=x[n]-\alpha x[n-1]$, so your numerator coefficients are $[1,-\alpha]$, and your denominator is 1 (so it's a non-recursive filter). – Matt L. Sep 8 '17 at 20:09