|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.jvoicexml.implementation.jsapi10.JVoiceXMLRecognitionListener
public final class JVoiceXMLRecognitionListener
Thread that waits for input from the recognizer.
Copyright © 2005-2007 JVoiceXML group - http://jvoicexml.sourceforge.net/
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
JVoiceXMLRecognitionListener(UserInputListener inputListener)
Construct a new object. |
|
| Method Summary | |
|---|---|
void |
audioReleased(ResultEvent resultEvent)
A AUDIO_RELEASED event has occured. |
void |
grammarFinalized(ResultEvent resultEvent)
A GRAMMAR_FINALIZED event has occured because the
Recognizer has determined which Grammar is
matched by the incoming speech. |
boolean |
isListening()
Check if the listener thread is still listening for recognition results. |
void |
resultAccepted(ResultEvent resultEvent)
An RESULT_ACCEPTED event has occured indicating that a
Result has transitioned from the UNFINALIZED
state to the ACCEPTED state. |
void |
resultCreated(ResultEvent resultEvent)
A RESULT_CREATED event is issued when a
Recognizer detects incoming speech that may match an active
grammar of an application. |
void |
resultRejected(ResultEvent resultEvent)
An RESULT_REJECTED event has occured indicating that a
Result has transitioned from the UNFINALIZED
state to the REJECTED state. |
void |
resultUpdated(ResultEvent resultEvent)
A RESULT_UPDATED event has occured because a token has been
finalized and/or the unfinalized text of a result has changed. |
void |
run()
Keep things alive. |
void |
stopListening()
Stop this listener. |
void |
trainingInfoReleased(ResultEvent resultEvent)
A TRAINING_INFO_RELEASED event has occured. |
void |
waitStopListening()
Wait until the listener thread terminates. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JVoiceXMLRecognitionListener(UserInputListener inputListener)
inputListener - Listener for user input events.| Method Detail |
|---|
public void run()
run in interface Runnablerun in class Threadpublic void stopListening()
public boolean isListening()
true if the recognition listener thread is alive.public void waitStopListening()
public void audioReleased(ResultEvent resultEvent)
AUDIO_RELEASED event has occured. This event is only
issued to finalized results. See the documentation of the
isAudioAvailable method the FinalResult
interface for details.
The event is issued to each ResultListener attached to the
Recognizer and to the Result. If a
GRAMMAR_FINALIZED event was issued, then the matched
Grammar is known, and the event is also issued to each
ResultListener attached to that Grammar.
audioReleased in interface ResultListenerresultEvent - ResultEventpublic void grammarFinalized(ResultEvent resultEvent)
GRAMMAR_FINALIZED event has occured because the
Recognizer has determined which Grammar is
matched by the incoming speech.
The event is issued to each ResultListener attached to the
Recognizer, Result, and matched
Grammar.
grammarFinalized in interface ResultListenerresultEvent - ResultEventpublic void resultAccepted(ResultEvent resultEvent)
RESULT_ACCEPTED event has occured indicating that a
Result has transitioned from the UNFINALIZED
state to the ACCEPTED state.
Since the Result source for this event is finalized, the
Result object can be safely cast to the
FinalResult interface.
resultAccepted in interface ResultListenerresultEvent - ResultEventpublic void resultCreated(ResultEvent resultEvent)
RESULT_CREATED event is issued when a
Recognizer detects incoming speech that may match an active
grammar of an application.
resultCreated in interface ResultListenerresultEvent - ResultEventpublic void resultRejected(ResultEvent resultEvent)
RESULT_REJECTED event has occured indicating that a
Result has transitioned from the UNFINALIZED
state to the REJECTED state.
resultRejected in interface ResultListenerresultEvent - ResultEventpublic void resultUpdated(ResultEvent resultEvent)
RESULT_UPDATED event has occured because a token has been
finalized and/or the unfinalized text of a result has changed.
resultUpdated in interface ResultListenerresultEvent - ResultEventpublic void trainingInfoReleased(ResultEvent resultEvent)
TRAINING_INFO_RELEASED event has occured. This event is
only issued to finalized results. See the documentation of the
isTrainingInfoAvailable method the FinalResult
interface for details.
trainingInfoReleased in interface ResultListenerresultEvent - ResultEvent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||