Hello list,

Watching the discussion on wideband, I thought an example of LSPs in
action might help clarify how they work.  Check out this plot:

        http://www.rowetel.com/images/codec2/hts2a_lsp_47_large.png

>From this blog post:

        http://www.rowetel.com/blog/?p=130

The green line is the spectrum of the speech, each "spike" is a harmonic
of the pitch.  the pitch is around 260Hz in this example. 

We use Linear Prediction Coefficients (LPC) to describe the spectral
envelope, in this case the purple line that roughly tracks the tips of
harmonics.  We use 10 LPCs, that can be thought of as 10th order filter
that describes the frequency response of your mouth!  It has peaks and
troughs, just like any other filter.

Sometimes, for high pitch speakers, you can get a peak in the LPC
spectral envelope that closely tracks a single harmonic.  But the same
peak in a male sample would contain many harmonics.

We use Line Spectral Pairs (LSPs) to encode the LPCs.  Turns out the
LPCs are difficult to encode and send over a channel.  The LSPs are
equivalent to LPCs, but easier to quantise to a small number of bits.
Each LSP turns out to be a frequency, which are plotted as the short red
lines at the top of the plot.  Note the LSPs are close together near
spectral peaks.

The LSPs do not, in general, encode the position of amplitude of
individual harmonics, but more the spectral envelope.  You don't need
more LSPs to encode more harmonics.

The number of harmonics in each frame varies with the pitch frequency. A
male will have more harmonics spaced closely together, a female or child
less.

Encoding more harmonics takes no extra bits.  We simply take the pitch
frequency, and space out as many harmonics as fit in 4 kHz.  The
amplitude of each harmonic is then set by the LPC spectral envelope.

Cheers,

David

On Tue, 2012-02-07 at 10:22 -0800, Bruce Perens wrote:
> On 02/07/2012 10:21 AM, Rick van Rein wrote:
> > The intention is to make high-pitch voices easier to recognise. They 
> > seem to loose harmonics when sampled at 8 kHz.
> Well, you have two issues then: whether the harmonic is present before 
> it's converted to an LSP, and whether there's an LSP to represent the 
> harmonic.
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________ Freetel-codec2 mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/freetel-codec2



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to