asra_set_utterance()

Copy an utterance to the specified buffer.

Synopsis:

#include "asr/asra.h"
 
int asra_set_utterance(asr_audio_info_t *info, int offset_ms)

Arguments:

info

Indicates the structure in which to store the utterance.

offset_ms

The offset (in milliseconds) of the utterance.

Library:

libasr

Description:

The asra_set_utterance() function copies the last captured audio sample to the buffer referenced by the info parameter, at the offset specified by the offset_ms parameter. If the requested offset results in a buffer overrun, an error is returned. If the audio capture hasn't completed, an error is returned.

Returns:

0 Success.

EBUSY Capture has not completed.

ENOMEM Buffer overrun or other memory error.