Prosody speech processing: API: sm_get_recorded_data

Prototype Definition

int sm_get_recorded_data(struct sm_ts_data_parms *datap)

Parameters

*datap
a structure of the following type:
typedef struct sm_ts_data_parms {
	tSMChannelId channel;					/* in */
	char *data;						/* in */
	tSM_INT length;						/* out */
} SM_TS_DATA_PARMS;

Description

This call retrieves a buffer of data recorded by a channel.

Before making a call to this function, the application should set the data parameter to point to a buffer of capacity kSMMaxRecordDataBufferSize octets. The channel from which data is to be fetched must be specified by the channel field.

On return from a successful invocation of this call, if any data was available for collection, channel will indicate the input channel concerned, and length will be set to the number of octets of valid data written by the device driver into the buffer data. The error ERR_SM_NO_DATA_AVAILABLE is never generated. Either the length returned is zero or the function blocks until some data is available.

Fields

channel
The channel which is recording.
data
The recorded data.
length
The amount of recorded data in data.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody speech processing API.