5.2. Parameterisation
109
else
theta2(k)=abs(atan(imag(r2(k))/real(r2(k))));
end
end
p=p-1;
for k=1:p/2
theta(k)=theta1(k*2);
theta(k+(p/2))=theta2(k*2);
end
lsp=sort(theta);
%Sort into ascending order
For testing purposes, an example set of LPC coefficients from tenth-order analysis of
speech is given below, with the corresponding LSP converted using the function above
(these are the same coefficients used previously for the illustration of LPC coefficients
in Section 5.2.1.1):
a=[1;-1.6187;2.3179;-2.9555;2.8862;-2.5331;2.2299;-1.3271;
0.9886;-0.6126;0.2354];
lsp=[0.3644;0.4023;0.6334;1.1674;1.3725;1.4205;1.8111;
1.8876;2.1032;2.3801];
Note that, by convention the LPC coefficient array always begins with a fixed ‘1.0’
(also as discussed in Section 5.2.1.1). By contrast, each of the LSP values is meaningful
in itself, although as we will examine in Section 5.2.5, they tend to occupy certain
frequency ranges most of the time.
5.2.4.2
Generation of LPC coefficients from LSPs
Conversion from LSPs to LPCs is a simple process (although the in-depth proof is more
difficult – for this refer to the excellent reference book by Saito and Nakata [3]). For this
conversion we can, of course, use the ordered LSPs
ω
k
to recreate the polynomials that
they are roots of, namely P
(z) and Q(z) [4]:
P
(z) = (1 − z
−1
)
k
=2,4,...,P
(1 − 2z
−1
cos
ω
k
+ z
−2
)
Q
(z) = (1 + z
−1
)
k
=1,3,...,P−1
(1 − 2z
−1
cos
ω
k
+ z
−2
)
(5.25)
and then these can be substituted into Equation (5.21) which expresses A
p
(z) as a linear
combination of P
(z) and Q(z). Since Equation (5.25) involves the cosine of the LSPs,
and bearing in mind that some of the more efficient LSP calculation algorithms will
yield the roots in the cosine domain [5], it is common also to perform the reverse
conversion from LPC to LSP in the cosine domain.
If q
k
denotes the array of correctly ordered, lowest-first, LSP frequencies
ω
k
, in the
cosine domain:
110
Do'stlaringiz bilan baham: |