asr_stop()

Stop an in-process recognition request.

Synopsis:

#include "asr/asr.h"
 
int asr_stop()

Arguments:

Library:

libasr

Description:

The asr_stop() function invokes the stop() callback function defined in the recognizer interface, asr_recognizer_if, and sets the hold count to 0. The recognizer stops audio acquisition and stops processing results. This call blocks until the recognizer returns, confirming that the recognition request has terminated. If there's no recognition request running, asr_stop() returns immediately with a successful result.

Returns:

0 Success.

-1 An error occurred; errno is set.