android.speech.recognition.RecognizerListener Class Reference

Inheritance diagram for android.speech.recognition.RecognizerListener:

Inheritance graph
[legend]
Collaboration diagram for android.speech.recognition.RecognizerListener:

Collaboration graph
[legend]

List of all members.


Detailed Description

Listens for recognizer events.

Author:
Gili Tzabari, Marc Robitaille

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

Member Enumeration Documentation

enum android::speech::recognition::RecognizerListener::FailureReason

Enumerator:
NO_MATCH  The audio did not generate any results.
SPOKE_TOO_SOON  Beginning of speech occured too soon.
BEGINNING_OF_SPEECH_TIMEOUT  A timeout occured before the beginning of speech.
RECOGNITION_TIMEOUT  A timeout occured before the recognition could complete.
TOO_MUCH_SPEECH  The recognizer encountered more audio than was acceptable according to its configuration.
RECOGNITION_3RD_PARTY_ERROR  Posting the recognition results to the 3rd party app server failed.
SPEECH_SERVER_UNAVAILABLE  The speech server is unavailable.
UNKNOWN  Unknown failure code.


Constructor & Destructor Documentation

UAPI_EXPORT android.speech.recognition.RecognizerListener.RecognizerListener (  )  [protected]

Prevent construction.

virtual UAPI_EXPORT android.speech.recognition.RecognizerListener.~RecognizerListener (  )  [protected, virtual]

Prevent destruction.


Member Function Documentation

UAPI_EXPORT const char* android.speech.recognition.RecognizerListener.toString ( FailureReason  reason  ) 

Returns the textual message associated with the error type.

Parameters:
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.

See also:
EmbeddedRecognizer.resetAcousticState()

virtual void android.speech.recognition.RecognizerListener.onRecognitionSuccess ( RecognitionResultProxy &  result  )  [pure virtual]

Invoked when a recognition success occurs.

Parameters:
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.

Parameters:
reason the failure reason
See also:
toString(FailureReason)

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
keys the list of parameter keys that were retrieved
values the list of parameter values that retrieved
count the number of parameters


Generated on Thu May 1 17:16:50 2008 for UAPI by  doxygen 1.5.3