0% found this document useful (0 votes)
45 views21 pages

Prepared By: Mamatha.K.S M.Tech (S.P) 1 Sem Guided By: Mr. Satish.M.N

This document discusses linear predictive coding (LPC) analysis of speech signals. LPC models speech as the output of an all-pole filter excited by an input signal representing voiced sounds as a periodic impulse train and unvoiced sounds as random noise. The document covers the basic principles of LPC including the classical speech production model, autocorrelation and covariance methods for estimating LPC coefficients using the Levinson-Durbin algorithm, and determining voiced/unvoiced classification and pitch periods from the LPC coefficients. Applications of LPC in speech coding and synthesis are also mentioned.

Uploaded by

profmns
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views21 pages

Prepared By: Mamatha.K.S M.Tech (S.P) 1 Sem Guided By: Mr. Satish.M.N

This document discusses linear predictive coding (LPC) analysis of speech signals. LPC models speech as the output of an all-pole filter excited by an input signal representing voiced sounds as a periodic impulse train and unvoiced sounds as random noise. The document covers the basic principles of LPC including the classical speech production model, autocorrelation and covariance methods for estimating LPC coefficients using the Levinson-Durbin algorithm, and determining voiced/unvoiced classification and pitch periods from the LPC coefficients. Applications of LPC in speech coding and synthesis are also mentioned.

Uploaded by

profmns
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Prepared by:

Mamatha.K.S
M.Tech(S.P) 1
st
sem
Guided by:
Mr. Satish.M.N
CONTENTS
INTRODUCTION
BASIC PRINCIPLES OF LPC
AUTOCORRELATION METHOD
COVARIENCE METHOD
COMPUTATION OF THE GAIN FOR THE MODEL
12/27/2012 2 ECE Dept, Signal Processing
INTRODUCTION
The set of linear predictive analysis technique is
referred as a LPC.
It is one of the most powerful speech analysis
technique.
This method has become the predominant technique
for estimating the basic speech parameters Eg.
Pitch,formants,spectra,vocal tract.
The important of LPC is accuracy in speech.
12/27/2012 3 ECE Dept, Signal Processing
Basic principles of linear predictive analysis

The Classical model of speech production: Linear
Prediction Coefficients (LPC)
Voicing: Voiced or unvoiced speech frame
Gain: Energy level of the frame
Filter Coefficients: Synthesis filter response
Pitch period: Time duration between consecutive
excitation pulses (voiced)
Speech synthesis model:
Impulse train generator governed by pitch period-- glottis
Random noise generator for consonant.
Vocal tract parameters = LPC parameters


12/27/2012 4 ECE Dept, Signal Processing
Block diagram of simplified model for
speech production


12/27/2012 5 ECE Dept, Signal Processing
The model and its representation
The LPC model looks at
speech as:
Excitation:
periodic (voiced) -
originating in the
larynx
noise (unvoiced) -
fricative, produced in
the mouth
An all-pole filter
representing the vocal
tract
H(
u
)
all pole
filter:
. . . .
12/27/2012 6 ECE Dept, Signal Processing
Z-Plane Representation
z-plane we can write the model as a transfer
function:

=
p
k
k
kz a
G
z H
1
1
) (
Clearly this transfer function has only poles - which is
why it represents an all pole filter.
12/27/2012 7 ECE Dept, Signal Processing
Mathematical Representation of the Model
The parameters of the all-pole filter model are
determined from the speech samples by means
of linear prediction. To be specific the output of
the Linear Prediction filter is:



the corresponding error between the observed
sample S(n) and the predicted value is

=
=
p
k
k
k n s k n s
1
^
) ( ) ( ) ( o
^
) ( ) ( ) ( n s n s n e =
12/27/2012 8 ECE Dept, Signal Processing
How do we find the Coefficients:
least squares
Formulation:
Given a signal s(n);
Defining an error as:

Find the set of that will minize the mean
square error:

=
=
p
k
k
k n s n s n e
1
) ( ) ( ) ( o
a
i
E e n
n
=

2
( )
12/27/2012 9 ECE Dept, Signal Processing
Solution:
Simply equate the derivative of E to zero:
c
c
E
a
i p
i
= = 0 1 , ...
Which gives us the Normal Equations:
p i i m s m s k n s i m s
m
p
k n
k
... 1 , ) ( ) ( ) ( ) (
1
= =

=
o
These are no more than p linear equations in
p unknowns...
12/27/2012 10 ECE Dept, Signal Processing
Auto-correlation Method
where is a pxp autocorrelation matrix, is a px1 autocorrelation vector,
and a is a px1 vector of model parameters.
[row col] = size(data);
if col==1 data=data'; end
nframe = 0;
msfr = round(sr/1000*fr); % Convert ms to samples
msfs = round(sr/1000*fs); % Convert ms to samples
duration = length(data);
speech = filter([1 -preemp], 1, data)'; % Preemphasize speech
msoverlap = msfs - msfr;
ramp = [0:1/(msoverlap-1):1]'; % Compute part of window
for frameIndex=1:msfr:duration-msfs+1 % frame rate=20ms
frameData = speech(frameIndex:(frameIndex+msfs-1)); % frame size=30ms
nframe = nframe+1;
autoCor = xcorr(frameData); % Compute the cross correlation
autoCorVec = autoCor(msfs+[0:L]);
a R
ss
ss
r
12/27/2012 11 ECE Dept, Signal Processing
12

( )
p i
a
E
E a
s a s e E
to N- n
s a s e
s a s a s a s a s e
f rom s s e
s a s a s a s a s
s s
i
p i
N n
n
p i
i
i n i n
N n
n
n
p i
i
i n i n n
p n p n n n n n
n n n
p n p n n n n
n n
,... 2 , 1 all 0for solve , generate that find To
1 0 frame whole the so
,
) ... (
) 1 ( ,
~
error prediction
) 1 ( ...
~

~
by denoted is value predicted The
min ,.. 2 , 1
1
0
2
1
1
0
2
1
3 3 2 2 1 1
3 3 2 2 1 1
= =
c
c
|
|
.
|

\
|
= =
=
=
+ + + + =
=
+ + + + =
=
=
=
=
=

=
=
=
=



12/27/2012 ECE Dept, Signal Processing



( ) ( )
(2) in equations of set by the .., out find can we , .., know we If
functions n correlatio - auto ,
) 2 (
:
:
:
:
...,
: ..., : : :
: ...,
...,
...,
have we ons manupulati some After
,... 2 , 1 all for 0 solve , generate that , find To
2 1 2 1 0
1
0
0 1
0
0
2
1
2
1
0 3 2 1
0 1 2
2 1 0 1
1 2 1 0
min ,.. 2 , 1
p p
i N n
n
i n n i
N n
n
n n
p p p p p
p
p
i
p i
a , ,a a r , ,r ,r r
s s r s s r
r
r
r
a
a
a
r r r r
r r r
r r r r
r r r r
p i
a
E
E a

=
=
+
=
=

=
= - = - =

(
(
(
(
(
(

=
(
(
(
(
(
(

(
(
(
(
(
(

= =
c
c
Use Durbins equation
to solve this
12/27/2012 13 ECE Dept, Signal Processing
(
(
(
(
(
(
(
(

I +
(
(
(
(
(
(
(
(

(
(
(
(
(
(
(
(

I +
(
(
(
(
(
(
(
(

+ + +
j
j
j
j
j
j
j
j
j
j
j
j
j
a
j a
j a
j a
a
a
R
c

c
0
0
0
0
0
0
1
) 1 (
) 1 (
) (
0
0
) (
) 2 (
) 1 (
1
1 1 1

Levinson-Durbin Recursion for all-pole model
(
(
(
(
(
(

=
(
(
(
(
(
(

(
(
(
(
(
(

) (
) 3 (
) 2 (
) 1 (
) 0 ( ) 3 ( ) 2 ( ) 1 (
) 3 ( ) 0 ( ) 1 ( ) 2 (
) 2 ( ) 1 ( ) 0 ( ) 1 (
) 1 ( ) 2 ( ) 1 ( ) 0 (
3
2
1
p R
R
R
R
a
a
a
a
R p R p R p R
p R R R R
p R R R R
p R R R R
p

12/27/2012 14 ECE Dept, Signal Processing


12/27/2012 15
COVARIANCE METHOD
SEE BLACK BOARD
ECE Dept, Signal Processing
Gain representation in the system
The gain parameter of the filter can be obtained by the
input-output relationship as follow


where X(n) represent the input sequence.
We can further manipulate this equation and in terms of
the error sequence we have

=
+ =
p
k
p
n Gx k n s k a n s
1
) ( ) ( ) ( ) (

=
= + =
p
k
p
n e k n s k a n s n Gx
1
) ( ) ( ) ( ) ( ) (


=

=
=
1
0
2
1
0
2 2
) ( ) (
N
n
N
n
n e n x G
12/27/2012 16 ECE Dept, Signal Processing
if the input excitation is normalized to unit energy by design, then



where G^2 is set equal to the residual energy resulting from the least square
optimization
once the LPC coefficients are computed, we can determine weather the
input speech frame is voiced, and if it is indeed voiced sound, then what is
the pitch. We can determine the pitch by computing the following sequence
in matlab:


which is defined as the autocorrelation sequence of the prediction
coefficients.

=

=
+ = =
p
k
ss p ss
N
n
N
n
k r k a r n e n x G
1
1
0
2
1
0
2 2
) ( ) ( ) 0 ( ) ( ) (
) ( ) ( ) (
1
k n r k r n r
ss
p
k
a e
=

=
) ( ) ( ) (
1
k i a k a n r
p
p
k
a a
+ =

=
12/27/2012 17 ECE Dept, Signal Processing
Voiced/Unvoiced
The fundamental difference between these two types of speech
sounds comes from the following:
the way they are produced.
The vibrations of the vocal cords produce voiced sounds.
The rate at which the vocal cords vibrate dictates the pitch of the
sound.
On the other hand, unvoiced sounds do not rely on the vibration
of the vocal cords.
The unvoiced sounds are created by the constriction of the vocal
tract.
The vocal cords remain open and the constrictions of the vocal
tract force air out to produce the unvoiced sounds

Given a short segment of a speech signal, lets say about 20 ms or 160
samples at a sampling rate 8 KHz, the speech encoder at the
transmitter must determine the proper excitation function, the pitch
period for voiced speech, the gain, and the coefficients
12/27/2012 18 ECE Dept, Signal Processing
Voiced and Unvoiced sounds
There are two mutually exclusive ways excitation functions to model
voiced and unvoiced speech sounds.

For a short time-basis analysis:
voiced speech is considered periodic with a fundamental
frequency of Fo, and a pitch period of 1/Fo, which depends on
the speaker. Hence, Voiced speech is generated by exciting the
all pole filter model by a periodic impulse train.

On the other hand, unvoiced sounds are generated by exciting the
all-pole filter by the output of a random noise generator

12/27/2012 19 ECE Dept, Signal Processing
Coding and synthesis
Predict speech signal based on past
Yule-Walker equation
Solve using
Covariance method
Autocorrelation method
Levinson-Durbin recursion
APPLICATIONS
12/27/2012 20 ECE Dept, Signal Processing
Conclusion
Sound produced through LPC method is not
exactly the real sound but it sounds intelligibly
understandable
LPC can be used in Speech recognition systems
LPC was widely used in Military because of low
bit rate in transmission
There are many variants over the basic scheme:
LPC-10, CELP, MELP, RELP, VSELP, ASELP, LD-
CELP...



12/27/2012 21 ECE Dept, Signal Processing

You might also like