5.2.1.1
The LPC filter
Assuming we have some LPC coefficients that describe the vocal characteristics of a
30 ms or so vector of speech residual, then these can be used in two ways. Firstly in a
synthesis filter to ‘add in’ the vocal characteristics to a sample vector. Secondly in an
analysis filter to remove the characteristics.
For
a
Pth-order
linear
prediction
filter
represented
by
P
coefficients
a
[0], a[1] . . . a[P − 1], the LPC synthesis filter is an all-pole infinite impulse re-
sponse (IIR) filter, shown for current sample n in Equation (5.1). x
(n) is the input audio
vector, and y
(n) is the vector of output audio, which would have the vocal characteristics
encoded in a added in to it:
y
(n) = x(n) +
P
−1
p
=0
a
(p)y(n − p).
(5.1)
In Matlab, the linear prediction coefficients are easy to generate using the lpc()
function, which uses the Durbin–Levinson–Itakura method (which we will explore later
in Section 5.2.2) to solve the recursive equations necessary to generate LPC coefficients.
Assume we have a Matlab recording of speech in some vector which is imagina-
tively named speech, we would normally analyse this one pseudo-stationary window
at a time, using overlapping windows. For 8 kHz sampling rate, and pseudo-stationarity
of 20–30 ms, we would thus define an analysis window of 160–240 samples (see Sec-
tion 2.5.1). For illustrative purposes, we will manually segment a speech recording,
window it, and perform LPC analysis to obtain a tenth-order set of linear prediction
coefficients:
seg=speech(1:160);
wseg=seg.*hamming(160);
a=lpc(wseg,10);
For the sake of demonstration and comparison, here is an example set of LPC coefficients
which we can use for testing:
Do'stlaringiz bilan baham: |