Hi everyone! It's my first time posting to this list, and I've got a fairly technical question. I'm interested in doing phoneme extraction, and one of the first steps in the algorithm I'm planning to use is to get the LPC coefficients for an input frame. Since Speex is CELP-based, the coefficients must be generated in there somewhere. I've tried digging around in the source code, but I'm finding it slow going. Does anyone know if there's an easy way to get at the data? Alternatively, is the format of the compressed Speex packets documented anywhere? I could probably extract the coefficients from the packets themselves. Any suggestions are much appreciated! Thanks! -- Bernie Roehl Software Consultant Mail: broehl@gmail.com Voice: (519) 577-8494 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070202/00a89f11/attachment.html
> I'm interested in doing phoneme extraction, and one of the first steps in > the algorithm I'm planning to use is to get the LPC coefficients for an > input frame. Since Speex is CELP-based, the coefficients must be generated > in there somewhere. I've tried digging around in the source code, but I'm > finding it slow going. Does anyone know if there's an easy way to get at > the data?The coefficients are generated by _spx_lpc(), but they're not stored directly in the bit-stream. However, if you look at the beginning of the encoder function in nb_celp.c, you'll see it's not too much trouble to get that code. Jean-Marc
Hi Jean-Marc I'm looking at the 1.0.5 source, and I'm not seeing an _spx_lpc(). There's an _spx_autocorr(), which is in lpc.c and is called near the start of the encoder function in nb_celp.c. The encoder seems to call the autocorr() function, then calls wld() to do something called Levinson-Durbin. Am I right in thinking that after the call to wld(), the st->lpc[] array contains the coefficients? Later on it computes "interpolated" LPCs -- are these what I want? Thanks again for the help -- it's appreciated! On 2/2/07, Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> wrote:> > > I'm interested in doing phoneme extraction, and one of the first steps > in > > the algorithm I'm planning to use is to get the LPC coefficients for an > > input frame. Since Speex is CELP-based, the coefficients must be > generated > > in there somewhere. I've tried digging around in the source code, but > I'm > > finding it slow going. Does anyone know if there's an easy way to get > at > > the data? > > The coefficients are generated by _spx_lpc(), but they're not stored > directly in the bit-stream. However, if you look at the beginning of the > encoder function in nb_celp.c, you'll see it's not too much trouble to > get that code. > > Jean-Marc >-- Bernie Roehl Software Consultant Mail: broehl@gmail.com Voice: (519) 577-8494 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070202/f43d905d/attachment.htm