AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.SpeechListener Interface Reference
Inheritance diagram for com.google.appinventor.components.runtime.SpeechListener:
com.google.appinventor.components.runtime.SpeechRecognizer

Public Member Functions

void onPartialResult (String text)
 
void onResult (String text)
 
void onError (int errorCode)
 

Detailed Description

This interface is used to declare functions associated with results and errors of SpeechRecognizer, used in both ServiceBasedSpeechRecognizer and IntentBasedSpeechRecognizer

Definition at line 12 of file SpeechListener.java.

Member Function Documentation

◆ onError()

void com.google.appinventor.components.runtime.SpeechListener.onError ( int  errorCode)

In case we need to report any errors, such as the activity or service dying for an unexpected reason

Implemented in com.google.appinventor.components.runtime.SpeechRecognizer.

◆ onPartialResult()

void com.google.appinventor.components.runtime.SpeechListener.onPartialResult ( String  text)

For the service based approach in which we can report partial results to the blocks

Implemented in com.google.appinventor.components.runtime.SpeechRecognizer.

◆ onResult()

void com.google.appinventor.components.runtime.SpeechListener.onResult ( String  text)

For the final result, used by both approaches

Implemented in com.google.appinventor.components.runtime.SpeechRecognizer.


The documentation for this interface was generated from the following file: