MelCepstrum(3SP)

NAME
MelCepstrum - mel cepstral coefficients

SYNOPSIS

#include <speech.h>

int MelCepstrum(short *speech, int length, float window, float step,
                float fSamp, int Nfilter, float ***MelCep, int n);

DESCRIPTION

The Mel cepstral speech analysis technique calculates the cepstral coefficients using a set filters scaled according to the Mel frequency scale.

The 16-bit speech data is pointed to by speech. The number of samples is length. The speech sample rate is given by fSamp, which should be the number of samples per second. The analysis window width is specified in milliseconds by win_size . The frame increment is specified in milliseconds by step_size .

The number of Mel frequence space filters is given by Nfilter. The number total number of Cepstral coefficients that needs to be calculated per frame is given by n. Space for the output is created with Alloc2d and assigned to *MelCep (Array of Mel Cepstrum coefficients). This can be treated as a two-dimensional array with the first index giving the time and the second giving the coefficient. The number of frames computed is returned on exit.

EXAMPLE
    short *speech;
    int length;
    float **Mel;
    int numberofwindows;

    numberofwindows=MelCepstrum(speech, length, 20.0, 10.0, 8000.0, 40, &Mel, 12);
    if (numberofwindows<0)
      fprintf(stderr,"MelCepstrum error: %s,ErrorString);

    This example computes 12 mel cepstral coefficients per frame, using a bank of 40 triangular filters spaced according to the mel frequency scale. The total number of windows calculated is denoted by numberofwindows.

DIAGNOSTICS
MelCepstrum returns a negative number on error and sets ErrorString. If successful MelCepstrum returns the total number of frames computed.

SEE ALSO
ErrorString(3SP), Alloc2d(3SP)

AUTHORS
Johan Schalkwyk
Center for Spoken Language Understanding
Department of Computer Science and Engineering
Oregon Graduate Institute of Science & Technology