[Clam-devel] lpc formant extraction question

David García Garzón dgarcia at iua.upf.edu
Mon Jun 18 10:57:32 PDT 2007


Abe, i just uploaded Sandra's code to CLAM/examples/FormantTracking

It is not usable as is, but, at least, it compiles perfectly using scons. 

It generates several binaries that exercise different subsets of the full 
algorithm. I deduce that the full algorithm is FormantExtractor_Example.

You'll still need to change some hardcoded paths to input and output files 
pointing which are pointing to some weird paths such as "c:\\aeiou.wav". I 
think such kind of paths are windows crap ;-) Expect a patch tomorrow to 
specify them by command line (i have the changes at home but no connection 
this weekend).

The applications had some visualization code dependent on the removed CLAM 
fltk module which has been commented out.

About the code itself It has it's own implementation of LPC. This is the 
original one we later moved and evolved in CLAM, so it may be replaced.

At least i hope it will help you to see whether you can use it. I still am in 
contact with Sandra so any question you have with the code i can forward her.

David.


On Saturday 16 June 2007 04:35:59 abe wrote:
> Thanks David...
>
> > Maybe is the time to move Sandra's formant tracking to the main
> > repository. You could be doing things that are already done. So it is
> > better to show you the code. I just joined all the related clam-draft
> > folders in a single one so it can be moved to a public repository.
> >
> > So, Xavi, Pau, where an how do i move it.
>
> I'd be glad to see it and possibly save myself some work...
>
> > I can't help you so much. I just ported the LPC to ports based behaviour
> > and i don't have much more insight on the algorithm than what you are
> > explaining. Sandra code has a class named PolynomialRootsFinder. In the
> > LPC there is an algorithm called Levinson Durbin which also computes
> > roots but i am not sure is that what you are looking for.
>
>  From what I understand, the Levinson-Durbin is a preceding step.  Let
> me explain it b/c I think it helps me understand it better and also b/c
> maybe someone will catch me if I'm making a mistake...
>
> The general procedure is
> windowing->autocorrelation coefficients->LPC coefficients->formants.
>
> The Levinson-Durbin recursion is the step that goes from the
> autocorrelation coefficients to LPC coefficients. For a linear
> prediction order of p, you use the previous p samples in a linear model
> to predict the p+1 sample.  The p coefficients of this linear model are
> the LPC coefficients.  To get these, you do the Levinson-Durbin
> algorithm which uses the auto correlation coefficients to recursively
> solve the LPC coefficients from 1 (first order filter)  to p (pth order
> filter).
>
> To get the formants, you have to solve the linear model of the LPC
> coefficients, which I think is just finding the roots of a polynomial or
> the poles of the filter.  The LPC coefficients are real valued, but the
> roots are complex.  The arg/angle of the root/pole is the formant
> frequency and the magnitude is the formant bandwidth.
>
> I've read up on it the first week of the SoC, so I think I understand
> it, but if I'm mistaken or missing something let me know.
>
> > Matrix code could be considered deprecated as it is almost not used, not
> > tested and FOSS software libraries around can do linear algebra faster.
>
> Are there any particular libraries that I should look at?
>
> Thanks,
> Abe






More information about the clam-devel mailing list