Sei sulla pagina 1di 11

LPC modeling of vocal tract 1

LPC (Linear Predictor Coding) is a method to represent and analyze human speech. The
idea of coding human speech is to change the representation of the speech. Representation
when using LPC is dened with LPC coefcients and an errorsignal, instead of the original
speech signal. The LPCcoefcients are found by LPCestimation which describes the inverse
transfer function of the human vocal tract.
LPC - predictions error filter Vocal tract model Speech production
g
A(z)
W
-
+
FIR
Impuls generator
/ white noise
v(n) u(n) e(n)
u(n-1)
y(n)
Z
-1
A(z)
Figure 1.1: Relationship between vocal tract model and LPC model.
The above gure 1.1 shows the relationship between vocal tract transfer function and the
LPC transfer function. Left part of the gure shows speech production model, while right-
hand side of gure shows LPC prediction error lter (LPC analysis lter) applied to output
of the vocal tract model. Vocal transfer function and LPC transfer function are dened as
follow:
H(z) =
g
A(z)
=
g
1+
n

k=1
a
k
z
k
(1.1)
A(z) = 1+
n

k=1
a
k
z
k
a
k
=
_
1 k = 0
w
k
k = 1, 2, .., M
(1.2)
The method to obtain the LPC coefcients included in the equation 1.2 is calculated using
LPC estimation. This method is described in next section. LPC analysis and LPC synthesis
is also describe in later sections, which has application in bandwidth expansion.
I
CHAPTER 1. LPC MODELING OF VOCAL TRACT
1.1 LPC-estimation
LPC estimation is used to constructing the LPC coefcients for the inverse transfer function
of the vocal tract. The standard methods for LPC coefcients estimation have the assump-
tion that the input signal is stationery. Quasi stationery signal is obtain by framing the input
signal which is often done in frames in length of 20 ms. A more stationery signal result in
a better LPC estimation because the signal is better described by the LPC coefcients and
therefore minimize the residual signal. The residual signal also called the error signal which
is described in next section.
LPC - estimation
S g, a
Figure 1.2: LPC-estimation blockdiagram
Figure 1.2 show a block diagram of a LPC estimation, where S is the input signal, g is the
gain of the residual signal (prediction error signal) and a is a vector containing the LPC
coefcients to a specic order. The size of vector depends on the order of the LPCestimation.
Bigger order means more LPC coefcients and therefore better estimation of the vocal tract.
Matlab LPC estimation:
1 [ aut os , l a g s ] = xc or r ( s ) ;
2 a ut os = a ut os ( f i nd ( l a g s ==0) : end ) ;
3 [ a , g ] = l e v i n s o n ( aut os , N) ;
4
5 %aut os : Au t o c o r r e l a t i o n of i n p u t s i g n a l [ v e c t o r ]
6 %s : I nput s i g n a l [ v e c t o r ]
7 %a : LPC c o e f f i c i e n t s
8 %g : Pr e d i c t i o n e r r or v ar i anc e
The above Matlab code calculate a and g from a given input signal S.
0.925 0.93 0.935 0.94 0.945 0.95
0.3
0.2
0.1
0
0.1
0.2
Input signal (frame: 38 of man_nb.wav)
Time [s]
A
m
p
litu
d
e
(a) Input signal
0 2 4 6 8 10 12
1.5
1
0.5
0
0.5
1
LPC coefficients (LPC order: 12, frame: 38 of man_nb.wav)
Coefficients [n]
A
m
p
litu
d
e
0 500 1000 1500 2000 2500 3000 3500 4000
70
60
50
40
30
20
LPC frequency response (frame: 38 of man_nb.wav)
Frequency [Hz]
A
m
p
litu
d
e
[d
B
]
(b) LPC coefcients and its frequency response
Figure 1.3: LPC estimation
Figure 1.3(a) show the input signal and gure 1.3(b) show the LPC coefcients and the fre-
quency response of the LPC coefcients, which is found using above Matlab code.
II
1.2. LPC-ANALYSIS
1.2 LPC-analysis
LPC analysis calculates an error signal from the LPC coefcients from LPC estimation. This
error signal is called the residual signal which could not be modeled by the LPC estimator.
It is possible to calculate this residual signal by ltering the original signal with the inverse
transfer function from LPC estimation. If the inverse transfer function from LPC estimation
is equal to the vocal tract transfer function then is the residual signal from the LPC analysis
equal to the residual signal which is put in to the vocal tract. In that case is the residual
signal equal to the impulses or noise from the human speech production (Se illustration
1.1).
LPC-analysis
e s
g, a
Figure 1.4: LPC-analysis.
Figure 1.4 show a block diagram of LPC analysis where S is the input signal, g and a is
calculated from LPC estimation and e is the residual signal for LPC analysis.
Matlab LPC analysis:
1 e = f i l t e r ( a , s qr t ( g ) , s ) ;
2
3 %e : Er r or s i g n a l f rom LPC a n a l y s i s [ v e c t o r ]
4 %a : LPC c o e f f i c i e n t s f rom LPC e s t i ma t i o n [ v e c t o r ]
5 %g : Pr e d i c t i o n e r r or v ar i anc e
6 %s : I nput s i g n a l [ v e c t o r ]
The above Matlab code calculate e by ltering the input signal S with the inverse transfer
function which is found from LPC estimation.
0.925 0.93 0.935 0.94 0.945 0.95
0.3
0.2
0.1
0
0.1
0.2
Input signal (frame: 38 of man_nb.wav)
Time [s]
A
m
p
litu
d
e
(a) Input signal
0.925 0.93 0.935 0.94 0.945 0.95
0.3
0.2
0.1
0
0.1
0.2
Error signal (frame: 38 of man_nb.wav)
Time [s]
A
m
p
litu
d
e
(b) Error signal
Figure 1.5: LPC analysis
Figure 1.5(a) show the input signal and gure 1.5(b) show the error signal fra LPC analysis
using the above Matlab code.
III
CHAPTER 1. LPC MODELING OF VOCAL TRACT
1.3 LPC-synthesis
LPC synthesis is used to reconstruct a signal from the residual signal and the transfer func-
tion of the vocal tract. Because the vocal tract transfer function is estimated from LPC es-
timation can this be used combined with the residual / error signal from LPC analysis to
construct the original signal.
LPC-systhesis
e s
g, a
Figure 1.6: LPC-synthesis.
Figure 1.6 show a block diagram of LPC synthesis where e is the error signal found from
LPC analysis and g and a from LPC estimation. Reconstruction of the original signal s is
done by ltering the error signal with the vocal tract transfer function.
Matlab LPC synthesis:
1 s = f i l t e r ( s qr t ( g ) , a , e ) ;
2
3 %s : I nput s i g n a l [ v e c t o r ]
4 %g : Pr e d i c t i o n e r r or v ar i anc e
5 %a : LPC c o e f f i c i e n t s f rom LPC e s t i ma t i o n [ v e c t o r ]
6 %e : Er r or s i g n a l f rom LPC a n a l y s i s [ v e c t o r ]
The above Matlab code calculate the original signal S from a error signal e and vocal tract
transfer function represented with a and g.
0.925 0.93 0.935 0.94 0.945 0.95
0.3
0.2
0.1
0
0.1
0.2
Error signal (frame: 38 of man_nb.wav)
Time [s]
A
m
p
litu
d
e
(a) Error signal
0.925 0.93 0.935 0.94 0.945 0.95
0.3
0.2
0.1
0
0.1
0.2
Reconstructed signal (frame: 38 of man_nb.wav)
Time [s]
A
m
p
litu
d
e
(b) Reconstructed signal
Figure 1.7: LPC synthesis
Figure 1.7(a) show the error signal and gure 1.7(b) show the original signal which is found
from LPC synthesis using the above Matlab code.
IV
1.4. APPLICATION OF LPC
1.4 Application of LPC
Bandwidth expansion is a method to increase the frequency range of a signal. The increase
in frequency is done by adding information about the higher frequency components. The
original frequency components (LPC coefcients) is found by using LPC estimation. Then
by adding the higher frequency components using code book for envelope extension and
excitation extension is it possible to increase the bandwidth of the signal.
LPC - estimation
Envelope
extension
LPC-analysis
Excitation
extension
LPC - synthesis
s
nb
e
nb
s
wb
e
wb
g
nb
, a
nb
g
wb
, a
wb
Figure 1.8: Bandwidth expansion.
Figure 1.8 show the block diagram of bandwidth expansion using LPC and codebook (en-
velope and excitation extension) with additional frequency information.
The matlab code in appendics implements all on the above blockdiagram besides excitation
and envelope extension.
V
CHAPTER 1. LPC MODELING OF VOCAL TRACT
1.5 Appendix
1.5.1 Wiener lter theory
W
-
+
FIR
e(n)
u(n)
y(n)
d(n)
Figure 1.9: Linear discrete-time lter
Orthogonality
y(n) = u(n|U
n
) =

k=0
w

k
u(nk) n = 0, 1, 2, ...
(1.3)
e(n) = d(n) y(n) (1.4)
J = E
_
e(n)e

(n)] = E[|e(n)|
2

(1.5)

k
J = 2E [u(nk)e

(n)] (1.6)

k
J = 0 E [u(nk)e

o
(n)] = 0 k = 0, 1, 2, ... (1.7)
Minimum mean-square error
e
o
(n) = d(n) y
o
(n) (1.8)
e
o
(n) = d(n)

d(n|U
n
) (1.9)
J
min
= E
_
|e
o
(n)|
2
_
(1.10)
VI
1.5. APPENDIX
Wiener hopf
E
_
u(nk)
_
d

(n)

i=0
w
oi
u

(mi)
__
= 0 k = 0, 1, 2, ... (1.11)

i=0
w
oi
E [u(nk)u

(ni)] = E [u(nk)d

(n)] k = 0, 1, 2, ... (1.12)


r(i k) = E [u(nk)u

(ni)] (1.13)
p(k) = E [u(nk)d

(n)] (1.14)

i=0
w
oi
r(i k) = p(k) k = 0, 1, 2, ... (1.15)
Rw
o
= p (1.16)
Wiener hopf (Matrix Formulation)
R =
_
u(n)u
H
(n)

R =
_

_
r(0) r(1) ... r(M1)
r

(1) r(0) ... r(M2)


. . .
r

(M1) r

(M2) ... r(0)


_

_
(1.17)
p = E [u(n)d

(n)] p = [p(0), p(1), ..., p(1M)]


T
(1.18)
w
o
= [w
o1
, w
o2
, ...w
oM1
]
T
(1.19)
w
o
= R
1
p (1.20)
VII
CHAPTER 1. LPC MODELING OF VOCAL TRACT
1.5.2 Prediction error lter
W
-
+
FIR
e(n)
u(n-1)
y(n)
Z
-1
u(n)
Figure 1.10: Prediction error lter
y(n) = u(n|U
n1
) =
M

k=1
w

k
u(nk) (1.21)
e(n) = u(n) u(n|U
n1
) (1.22)
e(n) = u(n)
M

k=1
w

k
u(nk) (1.23)
e(n) =
M

k=0
a

k
u(nk) (1.24)
e(n) =
M

k=0
a

k
u(nk) a
k
=
_
1 k = 0
w
k
k = 1, 2, .., M
(1.25)
1.5.3 Application matlab code
1 c l e ar ; c l o s e a l l
2
3 %%%%%%%%%%%%%%%%%%%
4 %I n i t i a l i z e s t a r t
5 number of LPCcoef f = 12 %or der of f or war d l i n e a r p r e d i c t o r ( g i v e s N+1 c o e f f i c i e n t s )
6 o f f s e t = 20; %used f rame i n i n p u t s i g n a l
7 f f t p o i n t s = 512; %number of f f t p o i n t s ( used f o r f f t and f r e q z a n a l y s i s )
8 hammingwindowed = 1; % i f t r ue , t he i n p u t s i g n a l i s hamming windowed
9 wave_as _i nput = 1; %i f t r ue , wave f i l e i s used as i n p u t s i g n a l
10
11 pl ot number = 1; %used f o r numberi ng t he f i g u r e s ( i nc r e me nt f o r each f i g u r e )
12 p l o t _ g l o b a l = 1;
13 p l o t _ e s t i ma t i o n _ a n a l y s i s _ i n p u t _ s i g n a l = 1;
14 pl ot _LPC_e s t i ma t i on_f r e que nc y_r e s pons e = 1;
15 p l o t _ LPC_ a n a l y s i s _ e r r o r _ s i g n a l = 1;
16 p l o t _ LP C_ s y n t h e s i s _ s i g n a l _ r e c o n s t r u c t i o n = 1;
17 e p s f i l e s = 0;
18
19 f r a me l e ngt h = 2010^3; %l e n g t h of f rame f rom i n p u t s i g n a l ( even number ) [ u n i t : s econd ]
20 f r a me l e n g t h o v e r l a p = 510^3; %l e n g t h of ov e r l ap bet ween t o f r ames [ u n i t : s econd ]
21 f r amel engt hwi ndow = f r a me l e ngt h + 2f r a me l e n g t h o v e r l a p ; %t o t a l l e n g t h of f r ames [ u n i t : s econd ]
22
23 %I n i t i a l i z e end
VIII
1.5. APPENDIX
24 %%%%%%%%%%%%%%%%%
25
26 %Loadi ng wa v f i l e s t a r t
27 us e d_wa v_f i l e = man_nb . wav ;
28 [ y , f s ] = wavread ( us e d_wa v_f i l e ) ;
29 y = y ( : , 1 ) ;
30
31 i f wave_as _i nput == 0
32 y = s i n (2 pi 1000( 0: 40000) 1/ f s ) ;
33 end
34 %Loadi ng wa v f i l e end
35
36 %Downsample i n p u t s i g n a l s t a r t
37 y = deci mat e ( y , 2 ) ;
38 f s = f s / 2
39 %Downsample i n p u t s i g n a l end
40
41 %%%%%%%%%%%%%%%%%%%%%%
42 %Pre i n i t a l i z e s t a r t
43 f r ames ampl es = f r amel engt hwi ndow / ( 1 / f s ) ; %l e n g t h of f rame f rom i n p u t s i g n a l [ u n i t : s ampl es ]
44 f r a me s a mpl e s ove r l a p = f r a me l e n g t h o v e r l a p / ( 1 / f s ) ; %l e n g t h of ov e r l ap bet ween t o f r ames [ u n i t : s ampl es ]
45
46 y = y ( 1 : l engt h ( y ) mod( l engt h ( y ) , f r ames ampl es ) ) ; %f i x t he l e n g t h of i n p u t s i g n a l f o r f r ami ng
47 minmaxy = [ min( y ) max( y ) ] ; %min and max v al ue s of i n p u t s i g n a l ( used f o r p l o t t i n g )
48 %Pre i n i t a l i z e end
49 %%%%%%%%%%%%%%%%%%%%
50
51 %Framei ng s t a r t
52 di mens i ony = s i z e ( y ) ; %used f o r r e c o n s t r u c t i o n ( c o nt a i n t he t r u e di me ns i ons of t he i n p u t s i g n a l )
53 di mens i onyf r ame = [ f r ames ampl es l e ngt h ( y ) / f r ames ampl es ] ; %used f o r f r amei ng [ s ampl es i n f rame , number of f r ames ]
54
55 %f r ami ng t he dat a
56 f or i = 1: di mens i onyf r ame ( 2 )
57 yf r ame ( : , i ) = y ( 1 + ( f r ames ampl es f r a me s a mpl e s ove r l a p ) ( i 1) : f r ames ampl es + ( f r ames ampl es f r a me s a mpl e s ove r l a p ) ( i 1) ) ;
58 end
59 mi nmaxyframe = [ min( yf r ame ( : , o f f s e t ) ) max( yf r ame ( : , o f f s e t ) ) ] ;
60 %Framei ng end
61
62 %Window s t a r t
63 i f hammingwindowed
64 yframewi ndow = yf r ame . [ hamming ( di mens i onyf r ame ( 1 ) ) ones ( 1 , di mens i onyf r ame ( 2 ) ) ] ;
65 e l s e
66 yframewi ndow = yf r ame ;
67 end
68 %Window end
69
70 %Mo d e l f i t t i n g s t a r t
71 si gnal NB = yframewi ndow ;
72 %Mo d e l f i t t i n g end
73
74 %LPC e s t i ma t i o n s t a r t
75 f or i = 1: di mens i onyf r ame ( 2 )
76 [ aut os i gnal NB ( : , i ) , l a g s ( i , : ) ] = xc or r ( si gnal NB ( : , i ) ) ;
77 end
78 aut os i gnal NB = aut os i gnal NB ( f i nd ( l a g s ( i , : ) ==0) : end , : ) ;
79 [ a , g ] = l e v i n s o n ( aut os i gnal NB , number of LPCcoef f ) ;
80 %LPC e s t i ma t i o n end
81
82 %Frequency r epons e of LPC t r a n s f e r f u n c t i o n s t a r t
83 [H, F] = f r e q z ( g ( o f f s e t ) ^ 0. 5 , a ( o f f s e t , : ) , f f t p o i n t s , f s ) ;
84 %Frequency r epons e of LPC t r a n s f e r f u n c t i o n end
85
86 %LPC pol y t o LSF s t a r t
87 l s f = p o l y 2 l s f ( a ( o f f s e t , : ) )
88 %LPC pol y t o LSF end
89
90 %Frequency r epons e of LSF s t a r t
91 [ H1 , F1 ] = f r e q z ( 1 , l s f , f f t p o i n t s , f s ) ;
92 %Frequency r epons e of LSF end
93
94 %LPC LSF t o pol y s t a r t
95 %a = l s f 2 p o l y ( l s f )
96 %LPC LSF t o pol y end
97
98 %LPC a n a l y s i s s t a r t
99 er r or NB = f i l t e r ( a ( o f f s e t , : ) , g ( o f f s e t ) . ^ 0 . 5 , si gnal NB ) ; % Er r or s i g n a l
100 %LPC a n a l y s i s end
101
102 %LPC s y n t h e s i s s t a r t
103 s i g n a l NBr e c o n s t r u c t e d = f i l t e r ( g ( o f f s e t ) ^ 0. 5 , a ( o f f s e t , : ) , er r or NB ) ;
104 %LPC s y n t h e s i s end
105
106 i f p l o t _ g l o b a l
107 f i gur e ( pl ot number )
108 pl ot number = pl ot number + 1;
109
110 s ubpl ot ( 2 , 1 , 1 )
111 hol d on
IX
CHAPTER 1. LPC MODELING OF VOCAL TRACT
112 pl ot yf r a me = pl ot ( [ 1 : f r ames ampl es ] , yf r ame ( : , o f f s e t ) , r )
113 i f hammingwindowed
114 pl ot ( [ 1 : f r ames ampl es ] , yframewi ndow ( : , o f f s e t ) , g ) , pl ot yf r amewi ndow = pl ot ( [ 1 : 5 : f r ames ampl es ] , yframewi ndow ( 1 : 5 : end , o f f s e t ) ,
go )
115 end
116 pl ot ( [ 1 : f r ames ampl es ] , r e al ( er r or NB ( : , o f f s e t ) ) , b ) , p l o t e r r o r = pl ot ( [ 1 : 5 : f r ames ampl es ] , r e al ( er r or NB ( 1 : 5 : end , o f f s e t ) ) , bx )
117 t i t l e ( s pr i nt f ( I nput s i g n a l and e r r o r s i g n a l ( f r ame : %d ) , o f f s e t ) )
118 xl abe l ( Sampl es [ n ] ) , yl abe l ( Ampl i t ude ) , gri d , xl i m ( [ 1 f r ames ampl es ] )
119 i f hammingwindowed
120 l egend ( [ pl ot yf r a me pl ot yf r amewi ndow p l o t e r r o r ] , I n p u t s i g n a l , I n p u t s i g n a l hamming , Er r o r s i g n a l )
121 e l s e
122 l egend ( [ pl ot yf r a me p l o t e r r o r ] , I n p u t s i g n a l , Er r o r s i g n a l )
123 end
124
125 s ubpl ot ( 2 , 1 , 2 )
126 mi nmaxdBscal e = [ min(20 l og10 (2abs (H) / f f t p o i n t s ) )6 max(20 l og10 (2abs (H) / f f t p o i n t s ) ) +6] ;
127 hol d on
128 p l o t f f t = pl ot ( [ 0 : f f t p o i n t s 1]f s / ( f f t p o i n t s 1) , 20 l og10 ( 2 abs ( f f t ( yframewi ndow ( : , o f f s e t ) , f f t p o i n t s ) ) / f f t p o i n t s ) )
129 pl ot ( F, 20 l og10 ( 2 abs (H) / f f t p o i n t s ) , r ) , p l o t l p c = pl ot ( F ( 1 : 1 0 : end ) , 20 l og10 ( 2 abs (H( 1 : 1 0 : end ) ) / f f t p o i n t s ) , r x
)
130 stem ( ( l s f / pi ) f s /2 , 200+20 l og10 ( ones ( 1 , l engt h ( l s f ) ) ) , m )
131 t i t l e ( s pr i nt f ( FFT of i n p u t s i g n a l and f r e que nc y r e pons e of LPC ( f r ame : %d ) , o f f s e t ) )
132 xl abe l ( Fr equency [ Hz ] ) , yl abe l ( Ampl i t ude [ dB] )
133 l egend ( [ p l o t f f t p l o t l p c ] , s pr i nt f ( FFT ( f f t p o i n t s : %d ) , f f t p o i n t s ) , s pr i nt f ( LPC ( or de r : %d ) , number of LPCcoef f ) ) , gri d , yl i m
( [ mi nmaxdBscal e ] ) , xl i m ( [ 0 f s / 2 ] )
134
135 i f e p s f i l e s
136 pr i nt deps c t i f f r 300 eps / l p c _ e s t i ma t i o n _ g l o b a l _ p l o t _ f f t _ l p c _ t i me _ BJ
137 end
138
139 end
140
141 i f p l o t _ e s t i ma t i o n _ a n a l y s i s _ i n p u t _ s i g n a l
142 f i g ur e ( pl ot number )
143 pl ot number = pl ot number + 1;
144
145 pl ot ( [ 0 : f r ames ampl es 1]1/ f s + ( f r amel engt hwi ndow f r a me l e n g t h o v e r l a p ) ( o f f s e t 1) , yframewi ndow ( : , o f f s e t ) )
146 t i t l e ( t e x l a b e l ( s pr i nt f ( I nput s i g n a l ( f r ame : %d of %s ) , o f f s e t , us e d_wa v_f i l e ) , l i t e r a l ) )
147 xl i m ( [ 0 f r ames ampl es 1]1/ f s + ( f r amel engt hwi ndow f r a me l e n g t h o v e r l a p ) ( o f f s e t 1) )
148 xl abe l ( Time [ s ] ) , yl abe l ( Ampl i t ude ) , yl i m ( [ minmaxyframe ] ) , gri d
149
150 i f e p s f i l e s
151 pr i nt deps c t i f f r 300 eps / l p c _ e s t i ma t i o n _ i n p u t _ s i g n a l _ BJ
152 end
153
154 end
155
156 i f pl ot _LPC_e s t i ma t i on_f r e que nc y_r e s pons e
157 f i g ur e ( pl ot number )
158 pl ot number = pl ot number + 1;
159
160 s ubpl ot ( 2 , 1 , 1 )
161 stem ( [ 0 : number of LPCcoef f ] , a ( o f f s e t , : ) )
162 t i t l e ( t e x l a b e l ( s pr i nt f ( LPC c o e f f i c i e n t s ( LPC or de r : %d , f r ame : %d of %s ) , number of LPCcoef f , o f f s e t , us e d_wa v_f i l e ) ,
l i t e r a l ) )
163 xl abe l ( Co e f f i c i e n t s [ n ] ) , yl abe l ( Ampl i t ude )
164
165 s ubpl ot ( 2 , 1 , 2 )
166 pl ot ( F, 20 l og10 (2abs (H) / f f t p o i n t s ) )
167 t i t l e ( t e x l a b e l ( s pr i nt f ( LPC f r e que nc y r e s pons e ( f r ame : %d of %s ) , o f f s e t , us e d_wa v_f i l e ) , l i t e r a l ) )
168 xl i m ( [ 0 f s / 2 ] ) , xl abe l ( Fr equency [ Hz ] ) , yl abe l ( Ampl i t ude [ dB] ) , gri d
169
170 i f e p s f i l e s
171 pr i nt deps c t i f f r 300 eps / l p c _ e s t i ma t i o n _ f r e q u e n c y _ r e s p o n s e _ o f _ l p c _ BJ
172 end
173
174 end
175
176 i f p l o t _ LPC_ a n a l y s i s _ e r r o r _ s i g n a l
177 f i g ur e ( pl ot number )
178 pl ot number = pl ot number + 1;
179
180 pl ot ( [ 0 : f r ames ampl es 1]1/ f s + ( f r amel engt hwi ndow f r a me l e n g t h o v e r l a p ) ( o f f s e t 1) , er r or NB ( : , o f f s e t ) )
181 t i t l e ( t e x l a b e l ( s pr i nt f ( Er r or s i g n a l ( f r ame : %d of %s ) , o f f s e t , us e d_wa v_f i l e ) , l i t e r a l ) )
182 xl i m ( [ 0 f r ames ampl es 1]1/ f s + ( f r amel engt hwi ndow f r a me l e n g t h o v e r l a p ) ( o f f s e t 1) )
183 xl abe l ( Time [ s ] ) , yl abe l ( Ampl i t ude ) , yl i m ( [ minmaxyframe ] ) , gri d
184
185 i f e p s f i l e s
186 pr i nt deps c t i f f r 300 eps / l p c _ a n a l y s i s _ e r r o r _ s i g n a l _ BJ
187 end
188
189 end
190
191 i f p l o t _ LP C_ s y n t h e s i s _ s i g n a l _ r e c o n s t r u c t i o n
192 f i g ur e ( pl ot number )
193 pl ot number = pl ot number + 1;
194
195 pl ot ( [ 0 : f r ames ampl es 1]1/ f s + ( f r amel engt hwi ndow f r a me l e n g t h o v e r l a p ) ( o f f s e t 1) , s i g n a l NBr e c o n s t r u c t e d ( : , o f f s e t ) )
X
1.5. APPENDIX
196 t i t l e ( t e x l a b e l ( s pr i nt f ( Re c ons t r uc t e d s i g n a l ( f r ame : %d of %s ) , o f f s e t , us e d_wa v_f i l e ) , l i t e r a l ) )
197 xl i m ( [ 0 f r ames ampl es 1]1/ f s + ( f r amel engt hwi ndow f r a me l e n g t h o v e r l a p ) ( o f f s e t 1) )
198 xl abe l ( Time [ s ] ) , yl abe l ( Ampl i t ude ) , yl i m ( [ mi nmaxyframe ] ) , gri d
199
200 i f e p s f i l e s
201 pr i nt deps c t i f f r 300 eps / l p c _ s y n t h e s i s _ s i g n a l _ r e c o n s t r u c t i o n _ BJ
202 end
203
204 end
XI

Potrebbero piacerti anche