Modules | Files | Inheritance Tree | Inheritance Graph | Name Index
module GNOME::Speech::Recognition
interface ResultListener
Files: GNOME_Speech.idl
GNOME-Speech-Recognition-ResultListener-inheritance GNOME-Speech-SpeechObject.html Bonobo-Unknown.html
Operations Summary:
 voidaudioReleased(in ResultEvent e)
 voidgrammarFinalized(in ResultEvent e)
 voidresultAccepted(in ResultEvent e)
 voidresultCreated(in ResultEvent e)
 voidresultRejected(in ResultEvent e)
 voidresultUpdated(in ResultEvent e)
 voidtrainingInfoReleased(in ResultEvent e)

Operations Inherited from Bonobo::Unknown
ref, unref, queryInterface

Operation Details:
 void audioReleased(in ResultEvent e)

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.

Parameters:
e - the Result event.
See Also:
ResultEvent#AUDIO_RELEASED
FinalResult#isAudioAvailable


 void grammarFinalized(in ResultEvent e)

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.

Parameters:
e - the Result event.
See Also:
ResultEvent#GRAMMAR_FINALIZED


 void resultAccepted(in ResultEvent e)

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.

Because the result is accepted, the matched Grammar for the result is guaranteed to be non-null. If the matched Grammar is a RuleGrammar, then the result object can be safely cast to FinalRuleResult (methods of FinalDictationResult throw an exception). If the matched Grammar is a DictationGrammar, then the result object can be safely cast to FinalDictationResult (methods of FinalRuleResult throw an exception).

The event is issued to each ResultListener attached to the Recognizer, Result, and matched Grammar.

The RESULT_ACCEPTED event is issued following the RECOGNIZER_SUSPENDED RecognizerEvent and while the Recognizer is in the SUSPENDED state. Once the RESULT_ACCEPTED event has been processed by all listeners, the Recognizer automatically commits all changes to grammars and returns to the LISTENING state. The only exception is when a call has been made to suspend without a following call to commitChanges. In this case the Recognizer remains SUSPENDED until commitChanges is called.

Parameters:
e - the Result event.
See Also:
ResultEvent#RESULT_ACCEPTED
FinalResult
FinalRuleResult
FinalDictationResult
RecognizerEvent
Recognizer#commitChanges


 void resultCreated(in ResultEvent e)

A RESULT_CREATED event is issued when a Recognizer detects incoming speech that may match an active grammar of an application.

The event is issued to each ResultListener attached to the Recognizer. (ResultListeners attached to a Grammar or to a Result never receive a RESULT_CREATED event.)

The RESULT_CREATED follows the RECOGNIZER_PROCESSING event that is issued RecognizerListeners to indicate that the Recognizer has changed from the LISTENING to the PROCESSING state.

Parameters:
e - the Result event.
See Also:
ResultEvent#RESULT_CREATED
RecognizerEvent#RECOGNIZER_PROCESSING


 void resultRejected(in ResultEvent e)

An RESULT_REJECTED event has occured indicating that a Result has transitioned from the UNFINALIZED state to the REJECTED state.

The casting behavior of a rejected result is the same as for a RESULT_ACCEPTED event. The exception is that if the grammar is not known (no GRAMMAR_FINALIZED event), then the result cannot be cast to either FinalRuleResult or FinalDictationResult.

The state behavior and grammar committing actions are the same as for the RESULT_ACCEPTED event.

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.

Parameters:
e - the Result event.
See Also:
ResultEvent#RESULT_REJECTED
FinalResult
FinalRuleResult
FinalDictationResult


 void resultUpdated(in ResultEvent e)

A RESULT_UPDATED event has occured because a token has been finalized and/or the unfinalized text of a result has changed.

The event is issued to each ResultListener attached to the Recognizer, to each ResultListener attached to the Result, and if the GRAMMAR_FINALIZED event has already been released to each ResultListener attached to the matched Grammar.

Parameters:
e - the Result event.
See Also:
ResultEvent#RESULT_UPDATED


 void trainingInfoReleased(in ResultEvent e)

A TRAINING_INFO_RELEASED event has occured. This event is only issued to finalized results. See the documentation of the isTrainingInfoAvailable method of 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.

Parameters:
e - the Result event.
See Also:
ResultEvent#TRAINING_INFO_RELEASED
FinalResult#isTrainingInfoAvailable