Pregunta

I'm trying to go through the procedure of Speech Synthesis via AR model, or LPC synthesis, IIR all-pole filter model, what ever you call it.

The main idea is to get the auto-correlation(AR) coefficient and estimate error, then use the AR coefficients to filter the estimated error, we can get the reconstructed signal.

**MATLAB CODE**

data = [1 2 1 3 5 1 2 5];
% auto correlation coefficients
a = lpc(data, 4);

% estimated signal
est = filter([0 -a(2:end)],1,data);
% estimated error
e = data - est;
% reconstructed signal
rec = filter(1,a,e);

You will see that rec == data exactly.

Now comes my question.

I'm trying to convert the model into Latices implementation. After looking up the Matlab reference, it turned out that I should use

tf2latc

to convert the transfer function into lattice implementation and

latcfilt

to use the lattice to filter the data.

Simply repeating the procedure above just doesn't work.

So I'm looking for help in the following aspects:

1) Example on using the tr2latc and latcfilt function to perform a complete procedure of building the filter. 2) Example on using a lattice implementation to perform a voice reconstruction.

Thx

¿Fue útil?

Solución

Well, finally I got the answer.

From a transfer function, we can get the lattice implementation coefficients. Then filter it with latcfilt.

a = [1 3 1 4 4];
[k v] = tf2latc(1,a)
x = [1 2 1 3 4 1 5];
filter(1,a,x)
latcfilt(k,v,x)

Then you can see that the two filter gives the same result.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top