Public Types | |
enum | FailureReason { NO_MATCH, SPOKE_TOO_SOON, BEGINNING_OF_SPEECH_TIMEOUT, RECOGNITION_TIMEOUT, TOO_MUCH_SPEECH, RECOGNITION_3RD_PARTY_ERROR, SPEECH_SERVER_UNAVAILABLE, UNKNOWN } |
Public Member Functions | |
UAPI_EXPORT const char * | toString (FailureReason reason) |
virtual void | onStarted ()=0 |
virtual void | onBeginningOfSpeech ()=0 |
virtual void | onEndOfSpeech ()=0 |
virtual void | onAcousticStateReset ()=0 |
virtual void | onRecognitionSuccess (RecognitionResultProxy &result)=0 |
virtual void | onRecognitionFailure (FailureReason reason)=0 |
virtual void | onError (ReturnCode::Type returnCode)=0 |
virtual void | onStopped ()=0 |
virtual void | onParametersSetError (const char **keys, const char **values, ARRAY_LIMIT count, ReturnCode::Type returnCode)=0 |
virtual void | onParametersGetError (const char **keys, ARRAY_LIMIT count, ReturnCode::Type returnCode)=0 |
virtual void | onParametersSet (const char **keys, const char **values, ARRAY_LIMIT count)=0 |
virtual void | onParametersGet (const char **keys, const char **values, ARRAY_LIMIT count)=0 |
Protected Member Functions | |
UAPI_EXPORT | RecognizerListener () |
virtual UAPI_EXPORT | ~RecognizerListener () |
Friends | |
class | RecognizerListenerProxy |
UAPI_EXPORT android.speech.recognition.RecognizerListener.RecognizerListener | ( | ) | [protected] |
Prevent construction.
virtual UAPI_EXPORT android.speech.recognition.RecognizerListener.~RecognizerListener | ( | ) | [protected, virtual] |
Prevent destruction.
UAPI_EXPORT const char* android.speech.recognition.RecognizerListener.toString | ( | FailureReason | reason | ) |
Returns the textual message associated with the error type.
reason | the failure reason |
virtual void android.speech.recognition.RecognizerListener.onStarted | ( | ) | [pure virtual] |
Invoked after recognition begins.
virtual void android.speech.recognition.RecognizerListener.onBeginningOfSpeech | ( | ) | [pure virtual] |
Invoked when the recognizer detects the beginning of speech.
virtual void android.speech.recognition.RecognizerListener.onEndOfSpeech | ( | ) | [pure virtual] |
Invoked when the recognizer detects the end of speech.
virtual void android.speech.recognition.RecognizerListener.onAcousticStateReset | ( | ) | [pure virtual] |
Invoked when the recognizer acoustic state is reset.
virtual void android.speech.recognition.RecognizerListener.onRecognitionSuccess | ( | RecognitionResultProxy & | result | ) | [pure virtual] |
Invoked when a recognition success occurs.
result | the recognition result. The result object can not be used outside of the scope of the onRecognitionSuccess() callback method. To be able to do so, copy it's contents to an user-defined object. An example of this object could be a vector of string arrays; where the vector represents a list of recognition result entries and each entry is an array of strings to hold the entry's values (the semantic meaning, confidence score and literal meaning). |
virtual void android.speech.recognition.RecognizerListener.onRecognitionFailure | ( | FailureReason | reason | ) | [pure virtual] |
Invoked when a recognition failure occurs.
reason | the failure reason |
virtual void android.speech.recognition.RecognizerListener.onError | ( | ReturnCode::Type | returnCode | ) | [pure virtual] |
Invoked when an unexpected error occurs. This is normally followed by onStopped() if the component shuts down successfully.
returnCode | the return code |
virtual void android.speech.recognition.RecognizerListener.onStopped | ( | ) | [pure virtual] |
Invoked when the recognizer shuts down (either normally or due to an error).
virtual void android.speech.recognition.ParametersListener.onParametersSetError | ( | const char ** | keys, | |
const char ** | values, | |||
ARRAY_LIMIT | count, | |||
ReturnCode::Type | returnCode | |||
) | [pure virtual, inherited] |
Invoked if setting parameters has failed.
keys | the parameter keys that could not be set | |
values | the parameter values associated with the keys | |
count | the number of parameters | |
returnCode | the return code |
virtual void android.speech.recognition.ParametersListener.onParametersGetError | ( | const char ** | keys, | |
ARRAY_LIMIT | count, | |||
ReturnCode::Type | returnCode | |||
) | [pure virtual, inherited] |
Invoked if retrieving parameters has failed.
keys | the parameter keys that could not be set | |
count | the number of parameters | |
returnCode | the return code |
virtual void android.speech.recognition.ParametersListener.onParametersSet | ( | const char ** | keys, | |
const char ** | values, | |||
ARRAY_LIMIT | count | |||
) | [pure virtual, inherited] |
This method is called when the parameters specified in setParameters have successfully been set. This method is guaranteed to be invoked after onParametersSetError, even if count==0.
keys | the list of parameter keys that were set | |
values | the list of parameter values that were set | |
count | the number of parameters |
virtual void android.speech.recognition.ParametersListener.onParametersGet | ( | const char ** | keys, | |
const char ** | values, | |||
ARRAY_LIMIT | count | |||
) | [pure virtual, inherited] |
This method is called when the parameters specified in getParameters have successfully been retrieved. This method is guaranteed to be invoked after onParametersGetError, even if count==0.
keys | the list of parameter keys that were retrieved | |
values | the list of parameter values that retrieved | |
count | the number of parameters |