[Clam-devel] lpc formant extraction question

David García Garzón dgarcia at iua.upf.edu
Fri Jun 15 12:06:09 PDT 2007


On Thursday 14 June 2007 04:54:49 abe wrote:
> Hi Everyone,
>
> I wanted to 1) update the list about what I'm working on, 2) to ask
> about a feature that I'm looking for, and 3) ask for any general input
> anyone feels like giving.
>
> 1) I'm working on formant extraction, which  aims to get a
> parameterization of speech sounds (vowels, mainly) based on a model that
> relates the the vocal tract shape to the spectral envelope of the
> sound.  You can see a nice example of a formant synthesizer, where the
> input to the system (the vocal folds vibrations) is filtered by the
> formants to create the output sound.  The formant extraction is the
> opposite of this, getting the formants from the speech input (and the
> by-product/residual is the vocal fold vibration).
>
> The usefulness of this is that the first formant corresponds to the size
> of the cavity below the constriction created by the tongue (you can hear
> it by flicking your adam's apple when making different vowels) and the
> second formant corresponds to the cavity between the constriction of the
> tongue and the lips (you can hear it by flicking your cheek or
> whistling). The third and higher formants are related to rounding of the
> lips and more complex sounds like english 'r'. The way I'm planning to
> do this is to use the LPC, which is  thankfully already implemented.
> I've been looking at the code, but I'm not  quite sure how to get what I
> want...

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.

> 2) The LPC autocorrelation returns the filter coefficients for the the
> model of the vocal tract.  What I'm trying to get is the poles that are
> obtained by solving the polynomial represented by the LPC coefficients
> (these are the formants).  By looking at the code I wasn't able to
> exactly tell whether I can do this or not.
>
> One place I looked was in the LPModel.*xx code.  There's a comment in
> LPModel.cxx that mentions the poles, but it seems like it's actually
> getting the spectrum and if it is getting the poles, I don't see how to
> access them in a public method.

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.

> The other place I looked was the matrix operations that are defined in
> clam.  I consulted the matlab 'roots' function, which could be used to
> get the roots/poles from the filter coefficients.  I realized that I
> should find code that gets the eigen values of a matrix.  Grepping thru
> the src files (find .. -name "*xx" -exec grep -iHn eigen '{}' ';')
> showed that the functions that I was looking for have been commented
> out.  I'm drawing a preliminary conclusion that they aren't implemented,
> but I wanted to double check about this.

Matrix code could be considered deprecated as it is almost not used, not 
tested and FOSS software libraries around can do linear algebra faster.

> 3) If you made it to this point in my long email, youre a true
> champion.  You probably have  lots of miscellaneous advice to give me...









More information about the clam-devel mailing list