asr_result_type

The status of the result.

Synopsis:

typedef struct asr_result_type {
	enum {
		ASR_RECOGNITION_GRAMMAR,
		ASR_RECOGNITION_DICTATION,
		ASR_RECOGNITION_INTENT,
	} recognition_type;
	enum {
		ASR_RESULT_PARTIAL,
		ASR_RESULT_FINAL,
		ASR_RESULT_FAILED,
	} result_type;
	enum {
		ASR_RESULT_OK,
		ASR_RESULT_LOW_CONFIDENCE,
		ASR_RESULT_REJECTED,
		ASR_RESULT_SILENCE,
		ASR_RESULT_CANCELED,
		ASR_RESULT_INTERUPTED,
		ASR_RESULT_MAX_RETRIES,
		ASR_RESULT_ERROR,
	} result_status;
	enum res_error_t {
		ASR_ERROR_NONE,
		ASR_ERROR_REMOTE_SERVER,
		ASR_ERROR_NETWORK,
		ASR_ERROR_GENERAL,
		ASR_ERROR_AUDIO,
		ASR_ERROR_TIMEOUT,
		ASR_ERROR_NO_MEMORY,
		ASR_WARNING_NOTHING_RECOGNIZED,
		ASR_WARNING_SPOKE_TOO_SOON,
		ASR_WARNING_SILENCE,
		ASR_ERROR_SERVICE_UNAVAILABLE,
	} error;
	char *error_description;
} asr_result_type_t;

Data:

enum recognition_type
The recognition type. Members include:
ASR_RECOGNITION_GRAMMAR
A grammar result.
ASR_RECOGNITION_DICTATION
A dictation result.
ASR_RECOGNITION_INTENT
An intent result.
enum result_type
The result type. Members include:
ASR_RESULT_PARTIAL
A partial result.
ASR_RESULT_FINAL
A final result
ASR_RESULT_FAILED
A failed result.
enum result_status
The result status. Members include:
ASR_RESULT_OK
The result is OK.
ASR_RESULT_LOW_CONFIDENCE
There is low confidience in the correctness of the result.
ASR_RESULT_REJECTED
The result is rejected.
ASR_RESULT_SILENCE
The recognizer did not find any speech in the audio capture.
ASR_RESULT_CANCELED
The recognition turn was canceled.
ASR_RESULT_INTERUPTED
The recognition turn was interrupted.
ASR_RESULT_MAX_RETRIES
The recognizer has retried the maximum number of times.
ASR_RESULT_ERROR
There was an error with the result.
enum error
Error codes. Members include:
ASR_ERROR_NONE
No error.
ASR_ERROR_REMOTE_SERVER
A server error occurred.
ASR_ERROR_NETWORK
A network error occurred.
ASR_ERROR_GENERAL
A general error occurred.
ASR_ERROR_AUDIO
An audio capture error occurred.
ASR_ERROR_TIMEOUT
A timeout error occurred.
ASR_ERROR_NO_MEMORY
There was insufficient memory for the operation.
ASR_WARNING_NOTHING_RECOGNIZED
The recognizer couldn't detect any speech (possibly because the audio level is too low).
ASR_WARNING_SPOKE_TOO_SOON
The user spoke too soon. This can cause the recognizer to miss the first part of the utterance.
ASR_WARNING_SILENCE
The recognizer couldn't detect any speech.
ASR_ERROR_SERVICE_UNAVAILABLE
The service is temporarily unavailable.
char * error_description
The long description of the error.

Library:

libasr

Description:

This data type describes the status of the recognition result.