COMPUTERASTA(3SP)

NAME
ComputeRASTA - Perceptual Linear Predictive analysis.

SYNOPSIS

#include <speech.h>

int ComputeRASTA (short *idata, int num_idata, int Win_offset,
                  int Win_size, int Step_size, float Sf, float Rst,
                  float Expon, int M, int Np, int gain, float pole,
                  float ***plpout_p, int *numframes_p )

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 idata. The number of samples is num_idata. The speech sample rate is given by Sf 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 the offset of the frames can be adjusted.

The model order is given by M The number of cepstral coefficients is given by Np 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.

(From Hynek Hermansky) The value of the pole determines, together with the frame-rate of the analysis (i.e. the sampling rate of spectral trajectories), the low cut-off frequency of the RASTA filter and the length of its impulse response (the larger the value of the pole, the lower the cut-off frequency and the larger the time constant). For the RASTA filter to be stable, the pole value must be less than 1.0. In our experiments with recognition of isolated telephone digits (ICSLP-92), we have found that for the frame-rate of 10 ms (i.e. 100 Hz sampling frequency), the optimal value of the pole was somewhere around 0.94. That corresponds to the cut-off frequency about 0.9 Hz and the 160 ms time constant of the RASTA filter. The factor Rst adjusts the amount of raste filtering. A Rasta factor of 0.0 is therefore equivalent to normal PLP analysis.

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

    c'(i) = (i**Expon) * c(i)

Space for the output is created with Alloc2D and assigned to *plpout_p.
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_p.

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

    /* read speech */

    /* compute PLP */
    if(ComputeRastaPLP(data, num_data, -64, 128, 64,
        sample_rate, 0.8, 0.6, 7, 8, 1, 0.94, &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.