asra_get_utterance()

Capture an utterance.

Synopsis:

#include "asr/asra.h"
 
int asra_get_utterance(asr_audio_info_t *info)

Arguments:

info

The structure in which to store the utterance and set the properties.

Library:

libasr

Description:

The asra_get_utterance() function stores an audio sample in the buffer referenced by the info parameter. It also sets the associated properties of the utterance: buffer size, sample size, sample rate, and number of channels. It waits until the audio capture has completed before copying the sample and returning.

Returns:

0 Success.

-1 An error occurred.