Build 1.0_r1(from source)

android.speech.recognition
Class AbstractRecognizerListener

java.lang.Object
  extended by android.speech.recognition.AbstractRecognizerListener
All Implemented Interfaces:
ParametersListener, RecognizerListener

public abstract class AbstractRecognizerListener
extends Object
implements RecognizerListener

A RecognizerListener whose methods are empty. This class exists as convenience for creating listener objects.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.speech.recognition.RecognizerListener
RecognizerListener.FailureReason
 
Constructor Summary
AbstractRecognizerListener()
           
 
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 onParametersGet(Hashtable<String,String> parameters)
          This method is called when the parameters specified in getParameters have successfully been retrieved.
 void onParametersGetError(Vector<String> parameters, Exception e)
          Invoked if retrieving parameters has failed.
 void onParametersSet(Hashtable<String,String> parameters)
          This method is called when the parameters specified in setParameters have successfully been set.
 void onParametersSetError(Hashtable<String,String> parameters, Exception e)
          Invoked if setting parameters has failed.
 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRecognizerListener

public AbstractRecognizerListener()
Method Detail

onBeginningOfSpeech

public void onBeginningOfSpeech()
Description copied from interface: RecognizerListener
Invoked if the recognizer detects the beginning of speech.

Specified by:
onBeginningOfSpeech in interface RecognizerListener

onEndOfSpeech

public void onEndOfSpeech()
Description copied from interface: RecognizerListener
Invoked if the recognizer detects the end of speech.

Specified by:
onEndOfSpeech in interface RecognizerListener

onRecognitionSuccess

public void onRecognitionSuccess(RecognitionResult result)
Description copied from interface: RecognizerListener
Invoked when a recognition result is generated.

Specified by:
onRecognitionSuccess in interface RecognizerListener
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

public void onRecognitionFailure(RecognizerListener.FailureReason reason)
Description copied from interface: RecognizerListener
Invoked when a recognition failure occurs.

Specified by:
onRecognitionFailure in interface RecognizerListener
Parameters:
reason - the failure reason

onError

public void onError(Exception e)
Description copied from interface: RecognizerListener
Invoked when an unexpected error occurs. This is normally followed by onStopped() if the component shuts down successfully.

Specified by:
onError in interface RecognizerListener
Parameters:
e - the cause of the failure

onParametersGetError

public void onParametersGetError(Vector<String> parameters,
                                 Exception e)
Description copied from interface: ParametersListener
Invoked if retrieving parameters has failed.

Specified by:
onParametersGetError in interface ParametersListener
Parameters:
parameters - the parameters that could not be retrieved
e - the failure reason

onParametersSetError

public void onParametersSetError(Hashtable<String,String> parameters,
                                 Exception e)
Description copied from interface: ParametersListener
Invoked if setting parameters has failed.

Specified by:
onParametersSetError in interface ParametersListener
Parameters:
parameters - the parameters that could not be set
e - the failure reason

onParametersGet

public void onParametersGet(Hashtable<String,String> parameters)
Description copied from interface: ParametersListener
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.

Specified by:
onParametersGet in interface ParametersListener
Parameters:
parameters - the retrieved parameters

onParametersSet

public void onParametersSet(Hashtable<String,String> parameters)
Description copied from interface: ParametersListener
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.

Specified by:
onParametersSet in interface ParametersListener
Parameters:
parameters - the set parameters

onStartOfSpeechTimeout

public void onStartOfSpeechTimeout()
Description copied from interface: RecognizerListener
Invoked if the recognizer does not detect speech within the configured timeout period.

Specified by:
onStartOfSpeechTimeout in interface RecognizerListener

onAcousticStateReset

public void onAcousticStateReset()
Description copied from interface: RecognizerListener
Invoked when the recognizer acoustic state is reset.

Specified by:
onAcousticStateReset in interface RecognizerListener
See Also:
EmbeddedRecognizer.resetAcousticState()

onStarted

public void onStarted()
Description copied from interface: RecognizerListener
Invoked after recognition begins.

Specified by:
onStarted in interface RecognizerListener

onStopped

public void onStopped()
Description copied from interface: RecognizerListener
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.

Specified by:
onStopped in interface RecognizerListener

Build 1.0_r1(from source)

Please submit a feedback, bug or feature