Public Member Functions | |
SpeechRecognizer (String configFilename, String grammarPath, String grammarName) | |
void | run () |
int | getQueueSize () |
String | popString () |
void | setEnabled (boolean e) |
boolean | isEnabled () |
void | destroy () |
Private Attributes | |
Recognizer | mRecognizer = null |
Microphone | mMicrophone = null |
volatile Thread | mRecognitionThread = null |
boolean | mRecognitionThreadRunning = false |
LinkedList< String > | mRecognizedStringQueue |
Definition at line 42 of file SpeechRecognizer.java.
|
Constructs and initializes the speech recognizer. 'grammarPath' can be a relative or absolute path. 'grammarName' is the name of a grammar within a .gram file in the 'grammarPath' (all .gram files in 'grammarPath' will automatically be searched). If the 'grammarName' is empty, no grammar will be used. Definition at line 65 of file SpeechRecognizer.java. References voce.SpeechRecognizer.mMicrophone, voce.SpeechRecognizer.mRecognizedStringQueue, and voce.SpeechRecognizer.mRecognizer. |
|
Deallocates speech recognizer.
Definition at line 232 of file SpeechRecognizer.java. References voce.SpeechRecognizer.mRecognizer, and voce.SpeechRecognizer.setEnabled(). Referenced by voce.SpeechInterface.destroy(). |
|
Returns the number of recognized strings currently in the recognized string queue. Definition at line 152 of file SpeechRecognizer.java. References voce.SpeechRecognizer.mRecognizedStringQueue. Referenced by voce.SpeechInterface.getRecognizerQueueSize(), and voce.SpeechRecognizer.popString(). |
|
Returns true if the recognizer is currently enabled.
Definition at line 226 of file SpeechRecognizer.java. References voce.SpeechRecognizer.mMicrophone. Referenced by voce.SpeechInterface.isRecognizerEnabled(). |
|
Returns and removes the oldest recognized string from the recognized string queue. Returns an empty string if the queue is empty. Definition at line 160 of file SpeechRecognizer.java. References voce.SpeechRecognizer.getQueueSize(), and voce.SpeechRecognizer.mRecognizedStringQueue. Referenced by voce.SpeechInterface.popRecognizedString(). |
|
Contains the main processing to be done by the recognition thread. Called indirectly after 'start' is called. Definition at line 114 of file SpeechRecognizer.java. References voce.SpeechRecognizer.mMicrophone, voce.SpeechRecognizer.mRecognitionThread, voce.SpeechRecognizer.mRecognitionThreadRunning, voce.SpeechRecognizer.mRecognizedStringQueue, and voce.SpeechRecognizer.mRecognizer. |
|
Enables and disables the speech recognizer. Starts and stops the speech recognition thread. Definition at line 174 of file SpeechRecognizer.java. References voce.SpeechRecognizer.mMicrophone, voce.SpeechRecognizer.mRecognitionThread, voce.SpeechRecognizer.mRecognitionThreadRunning, and voce.SpeechRecognizer.mRecognizedStringQueue. Referenced by voce.SpeechRecognizer.destroy(), and voce.SpeechInterface.setRecognizerEnabled(). |
|
The Microphone instance.
Definition at line 48 of file SpeechRecognizer.java. Referenced by voce.SpeechRecognizer.isEnabled(), voce.SpeechRecognizer.run(), voce.SpeechRecognizer.setEnabled(), and voce.SpeechRecognizer.SpeechRecognizer(). |
|
The thread used for speech recognition. This is necessary to avoid making applications wait for recognition to finish. Definition at line 52 of file SpeechRecognizer.java. Referenced by voce.SpeechRecognizer.run(), and voce.SpeechRecognizer.setEnabled(). |
|
A boolean that tracks whether the recognition thread is running.
Definition at line 55 of file SpeechRecognizer.java. Referenced by voce.SpeechRecognizer.run(), and voce.SpeechRecognizer.setEnabled(). |
|
A queue of the recognized strings.
Definition at line 58 of file SpeechRecognizer.java. Referenced by voce.SpeechRecognizer.getQueueSize(), voce.SpeechRecognizer.popString(), voce.SpeechRecognizer.run(), voce.SpeechRecognizer.setEnabled(), and voce.SpeechRecognizer.SpeechRecognizer(). |
|
The speech Recognizer instance.
Definition at line 45 of file SpeechRecognizer.java. Referenced by voce.SpeechRecognizer.destroy(), voce.SpeechRecognizer.run(), and voce.SpeechRecognizer.SpeechRecognizer(). |