<< Chapter < Page | Chapter >> Page > |
Download the file coeff.mat for the following section.
Download the file
coeff.mat and load it into the
Matlab workspace using the
load
command.
This will load three sets of filter coefficients:
,
, and
for the vocal tract model in
[link] and
[link] .
Each vector contains coefficients
for an all-pole filter of order 15.
We will now synthesize voiced speech segments for each of these sets of
coefficients.First write a Matlab function
x=exciteV(N,Np)
which creates a
length
excitation for voiced speech, with a pitch period of
Np samples.
The output vector
should contain a discrete-time impulse train
with period
Np (e.g. [1 0 0
0 1 0 0
]).
Assuming a sampling frequency of 8 kHz (0.125 ms/sample), create a 40 millisecond-long excitation with a pitch period of 8 ms,and filter it using [link] for each set of coefficients. For this, you may use the command
s = filter(1,[1 -A],x)
where
is the row vector of filter coefficients
(see Matlab's help on
filter for details).
Plot each of the three filtered signals.Use
subplot()
and
orient tall
to place them in the same figure.
We will now compute the frequency response of each of these filters.
The frequency response may be obtained by evaluating
[link] at points along
.
Matlab will compute this with the command
[H,W]=freqz(1,[1 -A],512)
,
where
is the vector of coefficients.
Plot the magnitude of each response versus frequency in Hertz.Use
subplot()
and
orient tall
to plot them in
the same figure.
The location of the peaks in the spectrum correspond to the formant frequencies.For each vowel signal, estimate the first three formants (in Hz) and list them in the figure.
Now generate the three signals again, but use an excitation which is 1-2
seconds long.Listen to the filtered signals using
soundsc
.
Can you hear qualitative differences in the signals?Can you identify the vowel sounds?
The filter coefficients which were provided in the previous section were determined using a technique called linear predictive coding (LPC). LPC is a fundamental component of many speech processing applications,including compression, recognition, and synthesis.
In the following discussion of LPC, we will view the speech signal as a discrete-time random process.
Suppose we have a discrete-time random process whose elements have some degree of correlation.The goal of forward linear prediction is to predict the sample using a linear combination of the previous samples.
is called the order of the predictor. We may represent the error of predicting by a random sequence .
An optimal set of prediction coefficients for [link] may be determined by minimizing the mean-square error . Note that since the error is generally a function of , the prediction coefficients will also be functions of . To simplify notation, let us first define the following column vectors.
Notification Switch
Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?