Newsgroups: comp.dsp,comp.speech,sci.math.num-analysis,comp.lang.functional
Path: lyra.csx.cam.ac.uk!warwick!uknet!bt!pipex!howland.reston.ans.net!math.ohio-state.edu!news.acns.nwu.edu!news.eecs.nwu.edu!bovik
From: bovik@eecs.nwu.edu (James Salsman)
Subject: Re: Cepstral & Energy Time Derivatives [Ans.]
Message-ID: <CrMn2y.F1t@eecs.nwu.edu>
Summary: general answer
Keywords: speech recognition
Sender: usenet@eecs.nwu.edu
Organization: BRI
References: <2trhp0$iar@tequesta.gate.net>
Date: Sun, 19 Jun 1994 04:28:08 GMT
Lines: 52
Xref: lyra.csx.cam.ac.uk comp.dsp:7732 comp.speech:2695 sci.math.num-analysis:9519 comp.lang.functional:2820

In article <2trhp0$iar@tequesta.gate.net>,
 Alexander, as Albert Iturrey <aiturrey@gate.net>, wrote:
>
> [Please provide:]
>
> 1)  Code that calculates Cepstral coefficients from known LPC's.

Here's a summation from the book by X. Huang, Y. Ariki, and M. Jack
entitled _Hidden_Markov_Models_for_Speech_Recognition_ (Edinburgh
University Press, 1990).  The equation is numbered 3.1.31 on page 64:

"Cepstral coefficients, which can also be obtained from LPC analysis,
have been widly used in speech recognition.  The cepstral coefficients,
c(n), of the spectra obtained from LPC analysis can be computed
recursively from the LPC coefficients, a(i).

               n-1
               ___
               \  `  n - i
    c  = -a  -  >   ------- a  c   
     n     n   /__,    n     i  n-1
               i=1

where a(i) = 0 when i > p (p is the order of the LPC analysis)."

I'm not sure if that's the most efficient algorithm for calculation of
cepstrums.  I've contemplated many different ways of compiling the
data flow from microphone to parser:

  Sampling --> LPC --> Cepstrum --> adaptive VQ --> Adaptive HMM.
          \          (& differences)    ^
           -----------> Energy --------/

But I have only a few ideas on how to code the resulting inner loops
more efficiently.  I have a friend who has lots of good ideas about
that kind of thing, though, and I'm passing along copy of this post
with high hopes.

> 2)  Code that calculates first and second-order energy time derivatives 
> from a known digitized signal.

I'd guess that you just calculate the energy of the signal for each
time frame and keep it around to difference with the next earlier
energy for the first-order differential.  Use a similar process for
the 2nd-order, but start with the 1st-order derivatives instead of the
energies.

If anyone out there knows of a good algorithm for calculating energy
from discrete sampled signal, I'd like to see that, too.

:James Salsman
::Bovik Research
