JSR-043: JTAPI-1.4

javax.telephony.media.provider
Class Base_ASREvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.telephony.media.provider.EventObject
              |
              +--javax.telephony.media.provider.Base.Event
                    |
                    +--javax.telephony.media.provider.Base.MediaServiceEvent
                          |
                          +--javax.telephony.media.provider.Base.ResourceEvent
                                |
                                +--javax.telephony.media.provider.Base_ASREvent
All Implemented Interfaces:
ASRConstants, ASREvent, Async_ASREvent, Async.Event, Async.MediaServiceEvent, Async.ResourceEvent, Dispatcher.DispatchableEvent, MediaConstants, MediaEvent, MediaServiceConstants, MediaServiceEvent, ResourceConstants, ResourceEvent, java.io.Serializable
Direct Known Subclasses:
S200_ASREvent

public abstract class Base_ASREvent
extends Base.ResourceEvent
implements Async_ASREvent

Defines the dispatch and accessor methods for ASR Events.

See S200_ASREvent for a concrete instantiation.

Since:
JTAPI-1.4
See Also:
Serialized Form

Inner classes inherited from class javax.telephony.media.provider.Base.Event
Base.Event.SyncInterruptedException
 
Inner classes inherited from class javax.telephony.media.ASREvent
ASREvent.TokenSequence
 
Fields inherited from interface javax.telephony.media.MediaServiceConstants
ev_BindAndConnect, ev_BindToCall, ev_BindToServiceName, ev_BindToTerminal, ev_BindToTerminalName, ev_Configure, ev_Connected, ev_DelegateToService, ev_Disconnected, ev_GetConfigSpec, ev_GetConfiguration, ev_GetParameters, ev_GetTerminal, ev_GetTerminalName, ev_GetUserValues, ev_GroupStop, ev_Release, ev_ReleaseDelegated, ev_ReleaseToDestroy, ev_ReleaseToService, ev_ReleaseToTag, ev_Retrieve, ev_Retrieved, ev_SetParameters, ev_SetUserDictionary, ev_SetUserValues, ev_TerminalIdle, ev_TriggerRTC
 
Fields inherited from interface javax.telephony.media.MediaConstants
e_OK, q_Duration, q_Standard, q_Stop
 
Fields inherited from interface javax.telephony.media.ResourceConstants
e_Disconnected, FOREVER, q_Disconnected, q_RTC, rtcc_Disconnected, rtcc_TriggerRTC, v_Forever
 
Fields inherited from interface javax.telephony.media.ASRConstants
a_AutomaticTraining, a_ContextType, a_Date, a_DefaultRules, a_DetectionType, a_EchoCancellation, a_IntermediateResults, a_Label, a_Language, a_LoadableContext, a_LoadedContext, a_NumberRepetitions, a_NumberWordsRequested, a_OutputType, a_PrivateRules, a_PublicRules, a_RepeatRecognition, a_ResourceName, a_ResourceVendor, a_ResourceVersion, a_ResultPresentation, a_Rules, a_Size, a_SpeakerType, a_SpecificUtterance, a_Spotting, a_Trainable, a_Training, a_TrainingModifiable, a_TrainingType, a_UtteranceType, a_UtteranceValidation, a_Variant, e_BadContainerName, e_BadContext, e_Exists, e_IncorrectContext, e_NoExists, e_NotSupported, ev_ContextCopy, ev_ContextCreate, ev_ContextGetParameters, ev_ContextRemove, ev_ContextSetParameters, ev_GetFinalResults, ev_GetResults, ev_GetRuleExpansion, ev_Idle, ev_IntermediateResultsReady, ev_InvalidUtterance, ev_RecognitionStarted, ev_Recognize, ev_RetrieveRecognition, ev_SetRuleExpansion, ev_Start, ev_Stop, ev_UpdateParameters, ev_ValidUtterance, ev_WordCommit, ev_WordCreate, ev_WordDeleteLastUtterance, ev_WordDeleteTraining, ev_WordDestroy, ev_WordTrain, p_ActiveContexts, p_ActiveRules, p_ActiveWords, p_AutomaticTraining, p_ContextType, p_DetectionType, p_Duration, p_EchoCancellation, p_EnabledEvents, p_FinalTimeout, p_GrammarBargeInThreshold, p_InitialTimeout, p_Label, p_Language, p_LoadedContexts, p_LoadedWords, p_NumberRepetitions, p_NumberWordsRequested, p_OutputType, p_PlayInput, p_PrivateRules, p_PublicRules, p_ResultPresentation, p_ResultType, p_Rules, p_Size, p_SpeakerType, p_SpecificUtterance, p_Spotting, p_StartPaused, p_State, p_StoreInput, p_TopChoices, p_Trainable, p_TrainingType, p_UpdateParametersList, p_UtteranceType, p_Variant, q_Complete, q_Failure, q_InitialTimeout, q_Rejected, q_Silence, q_Stop, q_Success, q_Unsuccessful, q_Warning, rtca_Idle, rtca_Start, rtca_Stop, rtca_UpdateParameters, rtcc_GrammarBargeIn, rtcc_InvalidUtterance, rtcc_Recognize, rtcc_RecognizeStarted, rtcc_Silence, rtcc_SpecificUtterance, rtcc_SpeechDetected, rtcc_TrainStarted, rtcc_ValidUtteranceFinal, rtcc_ValidUtteranceFound, rtcc_WordTrain, rtcc_WordTrained, v_AddTraining, v_Class, v_Collision, v_Complete, v_Continuous, v_Dependent, v_Discrete, v_Final, v_FromResource, v_Garbage, v_GrammarTag, v_Identification, v_Idle, v_Immutable, v_Inconsistent, v_Independent, v_Intermediate, v_Mutable, v_Noisy, v_Normal, v_NotModifiable, v_NotReady, v_Phonetic, v_Ready, v_RecognitionPaused, v_Recognizing, v_ResultsAvailable, v_Retrain, v_Silence, v_Speech, v_Success, v_Text, v_ToResource, v_ToResourceTraining, v_Training, v_TrainingPaused, v_TypeI, v_TypeII, v_Verification, v_WordTrained
 
Constructor Summary
Base_ASREvent(java.lang.Object source, Symbol eventID)
          Create specific completion or non-transaction event from ASR.
 
Method Summary
 void dispatch(java.util.EventListener listener)
          Send ASREvent to proper Listener.Callback method.
abstract  java.util.Dictionary getContextDictionary()
          Return a Dictionary containing the context parameters.
abstract  java.lang.String getContextName()
          Return the name of the affected context.
abstract  int getNumberOfSequences()
          The number of TokenSequences available.
abstract  Symbol getReadiness()
          Return a Symbol telling if the word has been sufficiently trained.
abstract  Symbol getResultPresentation()
          Return a Symbol indicating the type of results.
abstract  java.lang.String getRuleExpansion()
          Return the rule expansion from getRuleExpansion.
abstract  ASREvent.TokenSequence getTokenSequence(int seqNum)
          Return one recognition sequence.
abstract  Symbol getTrainingResult()
          Return a Symbol describing the results of training.
abstract  java.lang.String getWordName()
          Return the name of the affected word.
 
Methods inherited from class javax.telephony.media.provider.Base.ResourceEvent
getRTCTrigger, throwIfMediaResourceException
 
Methods inherited from class javax.telephony.media.provider.Base.MediaServiceEvent
getMediaService
 
Methods inherited from class javax.telephony.media.provider.Base.Event
done, getError, getEventID, getException, getPayload, getQualifier, getSubError, getWarning, isDone, setError, setFields, setFields, setPayload, setQualifier, setSubError, throwIfRuntimeException, toString, waitForEventDone, waitForEventDone, waitForListenersDone
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.telephony.media.async.Async.ResourceEvent
throwIfMediaResourceException
 
Methods inherited from interface javax.telephony.media.async.Async.Event
isDone, throwIfRuntimeException, waitForEventDone, waitForEventDone, waitForListenersDone
 
Methods inherited from interface javax.telephony.media.MediaEvent
getError, getEventID, getException, getPayload, getQualifier, getSubError, getWarning
 
Methods inherited from interface javax.telephony.media.MediaServiceEvent
getMediaService
 
Methods inherited from interface javax.telephony.media.ResourceEvent
getRTCTrigger
 

Constructor Detail

Base_ASREvent

public Base_ASREvent(java.lang.Object source,
                     Symbol eventID)
Create specific completion or non-transaction event from ASR.
Parameters:
source - the Object that created this EventObject.
eventID - a Symbol that identifies this event: ASR.ev_Recognize
Method Detail

getResultPresentation

public abstract Symbol getResultPresentation()
Description copied from interface: ASREvent
Return a Symbol indicating the type of results.
Specified by:
getResultPresentation in interface ASREvent
Following copied from interface: javax.telephony.media.ASREvent
Returns:
one of the Symbols ASRConstants.v_TypeI or ASRConstants.v_TypeII.

getContextDictionary

public abstract java.util.Dictionary getContextDictionary()
Description copied from interface: ASREvent
Return a Dictionary containing the context parameters.

Specified by:
getContextDictionary in interface ASREvent
Following copied from interface: javax.telephony.media.ASREvent
Returns:
context parameter Dictionary.
See Also:
ASR.contextGetParameters

getRuleExpansion

public abstract java.lang.String getRuleExpansion()
Description copied from interface: ASREvent
Return the rule expansion from getRuleExpansion.

Specified by:
getRuleExpansion in interface ASREvent
Following copied from interface: javax.telephony.media.ASREvent
Returns:
a String which is the rule expansion.
See Also:
ASR.getRuleExpansion()

getWordName

public abstract java.lang.String getWordName()
Description copied from interface: ASREvent
Return the name of the affected word.

Specified by:
getWordName in interface ASREvent
Following copied from interface: javax.telephony.media.ASREvent
Returns:
a String which is the name of the word.
See Also:
ASR.wordCommit(), ASR.wordCreate(), ASR.wordDeleteTraining(), ASR.wordDestroy(), ASR.wordTrain()

getContextName

public abstract java.lang.String getContextName()
Description copied from interface: ASREvent
Return the name of the affected context.
Specified by:
getContextName in interface ASREvent
Following copied from interface: javax.telephony.media.ASREvent
Returns:
a String which is the context name.
See Also:
ASR.contextRemove(), ASR.wordCommit(), ASR.wordCreate(), ASR.wordDeleteLastUtterance(), ASR.wordDeleteTraining(), ASR.wordDestroy(), ASR.wordTrain()

getReadiness

public abstract Symbol getReadiness()
Description copied from interface: ASREvent
Return a Symbol telling if the word has been sufficiently trained. It is used to determine whether more training is required before the Word can be committed; this value describes the overall state of the Word being trained.
Specified by:
getReadiness in interface ASREvent
Following copied from interface: javax.telephony.media.ASREvent
Returns:
one of ASRConstants.v_Ready, ASRConstants.v_NotReady, ASRConstants.v_Complete.
See Also:
ASR.wordTrain()

getTrainingResult

public abstract Symbol getTrainingResult()
Description copied from interface: ASREvent
Return a Symbol describing the results of training.
Specified by:
getTrainingResult in interface ASREvent
Following copied from interface: javax.telephony.media.ASREvent
Returns:
one of ASRConstants.v_Success, ASRConstants.v_Collision, ASRConstants.v_Inconsistent, ASRConstants.v_Noisy.
See Also:
ASR.wordTrain()

getNumberOfSequences

public abstract int getNumberOfSequences()
Description copied from interface: ASREvent
The number of TokenSequences available. For eventID equal ASR.ev_recognize this will be at most 1.
Specified by:
getNumberOfSequences in interface ASREvent
Following copied from interface: javax.telephony.media.ASREvent
Returns:
the int number of TokenSequences available for this event.

getTokenSequence

public abstract ASREvent.TokenSequence getTokenSequence(int seqNum)
Description copied from interface: ASREvent
Return one recognition sequence. Sequences are ranked in order of likelihood of being correct. Sequence number zero is the most likely.

This presentation may be sub-optimal for Type-I results.

If sequenceNumber is out of range null is returned.

Specified by:
getTokenSequence in interface ASREvent
Following copied from interface: javax.telephony.media.ASREvent
Parameters:
sequenceNumber - an int specifying the sequence to be returned; valid values are non-negative and less than getNumberOfSequences().
Returns:
a TokenSequence containing the specified row of results.
See Also:
ASR.getResults(), ASR.getFinalResults(), ASR.recognize()

dispatch

public void dispatch(java.util.EventListener listener)
Send ASREvent to proper Listener.Callback method. based on EventID.

Note: Although the S.200 packet may have eventID=ev_RetrieveRecognition, the S.410 event created in the MPI methods will have eventID=evGet[Final]Results.

Overrides:
dispatch in class Base.Event
Following copied from class: javax.telephony.media.provider.Base.Event
Parameters:
listener - an EventListener, some kind of MediaListener.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org