JSR-043: JTAPI-1.4

javax.telephony.media
Interface ASREvent

All Superinterfaces:
ASRConstants, MediaConstants, MediaEvent, MediaServiceConstants, MediaServiceEvent, ResourceConstants, ResourceEvent
All Known Subinterfaces:
Async_ASREvent

public interface ASREvent
extends ResourceEvent, ASRConstants

Defines the methods for ASR Events.

Recognition Results are returned in an ASREvent. Results consist of one or more TokenSequences.

Since:
JTAPI-1.4

Inner Class Summary
static interface ASREvent.TokenSequence
          Defines the methods for retrieving a single sequence of Tokens.
 
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
 
Method Summary
 java.util.Dictionary getContextDictionary()
          Return a Dictionary containing the context parameters.
 java.lang.String getContextName()
          Return the name of the affected context.
 int getNumberOfSequences()
          The number of TokenSequences available.
 Symbol getReadiness()
          Return a Symbol telling if the word has been sufficiently trained.
 Symbol getResultPresentation()
          Return a Symbol indicating the type of results.
 java.lang.String getRuleExpansion()
          Return the rule expansion from getRuleExpansion.
 ASREvent.TokenSequence getTokenSequence(int sequenceNumber)
          Return one recognition sequence.
 Symbol getTrainingResult()
          Return a Symbol describing the results of training.
 java.lang.String getWordName()
          Return the name of the affected word.
 
Methods inherited from interface javax.telephony.media.ResourceEvent
getRTCTrigger
 
Methods inherited from interface javax.telephony.media.MediaServiceEvent
getMediaService
 
Methods inherited from interface javax.telephony.media.MediaEvent
getError, getEventID, getException, getPayload, getQualifier, getSubError, getWarning
 

Method Detail

getResultPresentation

public Symbol getResultPresentation()
Return a Symbol indicating the type of results.
Returns:
one of the Symbols ASRConstants.v_TypeI or ASRConstants.v_TypeII.

getNumberOfSequences

public int getNumberOfSequences()
The number of TokenSequences available. For eventID equal ASR.ev_recognize this will be at most 1.
Returns:
the int number of TokenSequences available for this event.

getTokenSequence

public ASREvent.TokenSequence getTokenSequence(int sequenceNumber)
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.

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()

getContextDictionary

public java.util.Dictionary getContextDictionary()
Return a Dictionary containing the context parameters.

Returns:
context parameter Dictionary.
See Also:
ASR.contextGetParameters

getRuleExpansion

public java.lang.String getRuleExpansion()
Return the rule expansion from getRuleExpansion.

Returns:
a String which is the rule expansion.
See Also:
ASR.getRuleExpansion()

getWordName

public java.lang.String getWordName()
Return the name of the affected word.

Returns:
a String which is the name of the word.
See Also:
ASR.wordCommit(), ASR.wordCreate(), ASR.wordDeleteTraining(), ASR.wordDestroy(), ASR.wordTrain()

getContextName

public java.lang.String getContextName()
Return the name of the affected context.
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 Symbol getReadiness()
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.
Returns:
one of ASRConstants.v_Ready, ASRConstants.v_NotReady, ASRConstants.v_Complete.
See Also:
ASR.wordTrain()

getTrainingResult

public Symbol getTrainingResult()
Return a Symbol describing the results of training.
Returns:
one of ASRConstants.v_Success, ASRConstants.v_Collision, ASRConstants.v_Inconsistent, ASRConstants.v_Noisy.
See Also:
ASR.wordTrain()

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org