org.jvoicexml.implementation.jsapi10
Class JVoiceXMLRecognitionListener

java.lang.Object
  extended by org.jvoicexml.implementation.jsapi10.JVoiceXMLRecognitionListener
All Implemented Interfaces:
EventListener, ResultListener

public final class JVoiceXMLRecognitionListener
extends Object
implements ResultListener

Waits for input from the recognizer.

Version:
$Revision: 2355 $

Copyright © 2005-2008 JVoiceXML group - http://jvoicexml.sourceforge.net/

Author:
Dirk Schnelle

Constructor Summary
JVoiceXMLRecognitionListener(Jsapi10SpokenInput spokenInput)
          Constructs 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.
 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 trainingInfoReleased(ResultEvent resultEvent)
          A TRAINING_INFO_RELEASED event has occured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JVoiceXMLRecognitionListener

public JVoiceXMLRecognitionListener(Jsapi10SpokenInput spokenInput)
Constructs a new object.

Parameters:
spokenInput - the related spoken input device.
Method Detail

audioReleased

public void audioReleased(ResultEvent resultEvent)
A 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.

Specified by:
audioReleased in interface ResultListener
Parameters:
resultEvent - ResultEvent

grammarFinalized

public void grammarFinalized(ResultEvent resultEvent)
A 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.

Specified by:
grammarFinalized in interface ResultListener
Parameters:
resultEvent - ResultEvent

resultAccepted

public void resultAccepted(ResultEvent resultEvent)
An 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.

Specified by:
resultAccepted in interface ResultListener
Parameters:
resultEvent - ResultEvent

resultCreated

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

Specified by:
resultCreated in interface ResultListener
Parameters:
resultEvent - ResultEvent

resultRejected

public void resultRejected(ResultEvent resultEvent)
An RESULT_REJECTED event has occured indicating that a Result has transitioned from the UNFINALIZED state to the REJECTED state.

Specified by:
resultRejected in interface ResultListener
Parameters:
resultEvent - ResultEvent

resultUpdated

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

Specified by:
resultUpdated in interface ResultListener
Parameters:
resultEvent - ResultEvent

trainingInfoReleased

public void trainingInfoReleased(ResultEvent resultEvent)
A 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.

Specified by:
trainingInfoReleased in interface ResultListener
Parameters:
resultEvent - ResultEvent


Copyright © 2005-2009JVoiceXML group.