SpeechRead(3SP)

NAME
SpeechRead - detects and reads ADC or SPHERE-headered WAV files

SYNOPSIS

#include <speech.h>

int SpeechRead (char *filename, short **samples_p, float *sample_rate_p)

DESCRIPTION
SpeechRead reads the samples from filename, returning the number of samples read. Space is allocated and assigned to *samples_p. The samples are uncompressed, if necessary, and placed in host byte order. The sample rate (number of samples in one second) is assigned to *sample_rate_p.

The file can be in either ADC or SPHERE-headered wave format. If the file begins with the characters "NIST_1A", then it is assumed to be WAV format. If not, it is assumed to be ADC format.

DIAGNOSTICS
If an error occurs, -1 is returned and the external variable char *ErrorString is set.

BUGS

SEE ALSO
ErrorString(3SP), AdcRead(3SP), WavRead(3SP)

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