asrm_set_utterance()

Copy an utterance to the specified buffer.

Synopsis:

#include "asr/asrm.h"
 
int asrm_set_utterance(asr_module_hdl_t *mod, asr_audio_info_t *audio_info, uint32_t ms_offset)

Arguments:

mod

A pointer to the module handle (for error logging).

audio_info

A pointer to the structure in which to store the utterance.

ms_offset

The offset (in milliseconds) of the utterance.

Library:

libasr

Description:

The asrm_set_utterance() function copies the last captured audio sample to the buffer referenced by the audio_info parameter, at the offset specified by the ms_offset parameter. If the requested offset results in a buffer overrun, an error is returned. If the audio capture has not completed, an error is returned.

Returns:

0 Success.

EBUSY Capture has not completed.

ENOMEM Buffer overrun or other memory error.