Build 1.0_r1(from source)

android.speech.recognition
Interface RecognizerListener

All Superinterfaces:
ParametersListener
All Known Implementing Classes:
AbstractRecognizerListener

public interface RecognizerListener
extends ParametersListener

Listens for recognizer events.


Nested Class Summary
static class RecognizerListener.FailureReason
          Recognition failure.
 
Method Summary
 void onAcousticStateReset()
          Invoked when the recognizer acoustic state is reset.
 void onBeginningOfSpeech()
          Invoked if the recognizer detects the beginning of speech.
 void onEndOfSpeech()
          Invoked if the recognizer detects the end of speech.
 void onError(Exception e)
          Invoked when an unexpected error occurs.
 void onRecognitionFailure(RecognizerListener.FailureReason reason)
          Invoked when a recognition failure occurs.
 void onRecognitionSuccess(RecognitionResult result)
          Invoked when a recognition result is generated.
 void onStarted()
          Invoked after recognition begins.
 void onStartOfSpeechTimeout()
          Invoked if the recognizer does not detect speech within the configured timeout period.
 void onStopped()
          Invoked when the recognizer stops (due to normal termination or an error).
 
Methods inherited from interface android.speech.recognition.ParametersListener
onParametersGet, onParametersGetError, onParametersSet, onParametersSetError
 

Method Detail

onStarted

void onStarted()
Invoked after recognition begins.


onBeginningOfSpeech

void onBeginningOfSpeech()
Invoked if the recognizer detects the beginning of speech.


onEndOfSpeech

void onEndOfSpeech()
Invoked if the recognizer detects the end of speech.


onStartOfSpeechTimeout

void onStartOfSpeechTimeout()
Invoked if the recognizer does not detect speech within the configured timeout period.


onAcousticStateReset

void onAcousticStateReset()
Invoked when the recognizer acoustic state is reset.

See Also:
EmbeddedRecognizer.resetAcousticState()

onRecognitionSuccess

void onRecognitionSuccess(RecognitionResult result)
Invoked when a recognition result is generated.

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).

onRecognitionFailure

void onRecognitionFailure(RecognizerListener.FailureReason reason)
Invoked when a recognition failure occurs.

Parameters:
reason - the failure reason

onError

void onError(Exception e)
Invoked when an unexpected error occurs. This is normally followed by onStopped() if the component shuts down successfully.

Parameters:
e - the cause of the failure

onStopped

void onStopped()
Invoked when the recognizer stops (due to normal termination or an error). Invoking stop() on a recognizer that is already stopped will not result in a onStopped() event.


Build 1.0_r1(from source)

Please submit a feedback, bug or feature