COMPUTEPLP(3SP)

NAME
ComputePLP - Perceptual Linear Predictive analysis.

SYNOPSIS

#include <speech.h>

int ComputePLP (short *data, int num_data, int win_offset, int win_size,
                int step_size, double sample_rate, double peak_enhance,
                int model_order, int num_param, int gain,
                float ***plp_out, int *numframes_out )

DESCRIPTION

The Perceptual Linear Predictive (PLP) speech analysis technique estimates an all-pole (autoregressive) model of the auditory-like short-term speech spectrum. PLP has been shown to be efficient in suppressing speaker-dependent components in the speech signal. Compared to the conventional linear predictive (LP) analysis of speech (which estimates an all-pole model of the short-term power spectrum of speech), the PLP-model order in speaker-independent applications is typically lower (e.g. 5 or 7).

The 16-bit speech data is pointed to by data. The number of samples is num_data. The speech sample rate is given by sample_rate, which should be the number of samples per second. The analysis window width is specified in sample points by win_size. The frame increment is specified in sample points by step_size. The first window starts at sample win_offset. This value can be negative (but with magnitude less than the window width), in which case the signal is left-padded with 0 before analysis. This option is provided so that the offset of the frames can be adjusted.

The model order is given by model_order. The number of cepstral coefficients is given by num_param. One greater than the model order is a good default. The 0th coefficient is the log gain of the PLP model.

Gain is turned on and off by the flag gain. If it is 0, the first coefficient (log gain) is 0.0.

The peak enhancement factor peak_enhance is used to exponentially weight the cepstral coefficients:

    c'(i) = (i**peak_enhance) * c(i)

Space for the output is created with Alloc2d and assigned to *plp_out. 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 in *numframes_out.

EXAMPLE
    short *data;
    int num_data, numframes;
    float **plp;
    double sample_rate;
    extern char *ErrorString;

    /* read speech */

    /* compute PLP */
    if(ComputePLP(data, num_data, 0, 256, 128, sample_rate,
        0.6, 7, 8, 1, &plp, &numframes) < 0) {
        fprintf(stderr,"ComputePLP error: %s",ErrorString);
    }

DIAGNOSTICS
ComputePLP returns a negative number on error and sets ErrorString.

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

AUTHORS
Algorithm and original FORTRAN code by Hynek Hermansky. Code modified by Johan Schalkwyk at CSLU, Oregon Graduate Institute.