ISpeechGrammarRuleState AddSpecialTransition Method (SAPI 5.3)
Microsoft Speech API 5.3
Interface: ISpeechGrammarRuleState
AddSpecialTransition Method
The AddSpecialTransition method adds a special transition from the current rule state to another rule state in the same rule.
When the word sequence accepted by the special transition is spoken, the rule can go from the current state to the DestinationState. A rule accepts a word sequence when the rule can go from the initial state to the end state using the word sequence.
Special transitions may not be supported by all speech engines. There are three types of special transitions:
- Wildcard: A wildcard tag is used to accept words not critical to a rule's intent and allows any word or words to be spoken for that position.
- Dictation: A dictation tag allows any word or words to be spoken for that position and each word is returned by the SR engine in the phrase element list. Unlike the wildcard, the word or words are considered important to the rule. See Grammar Format Tags: Special Characters for more information about the wildcard and dictation tags.
- Textbuffer: A Textbuffer accepts the word sequence and can be set later using ISpeechRecoGrammar.SetWordSequenceData and ISpeechRecoGrammar.SetTextSelection.
ISpeechGrammarRuleState.AddSpecialTransition(
DestinationState As ISpeechGrammarRuleState,
Type As SpeechSpecialTransitionType,
[PropertyName As String = ""],
[PropertyId As Long = 0],
[PropertyValue As Variant = 0],
[Weight As Single = 1.0]
)
Parameters
- DestinationState
Specifies the DestinationState, or the state where the transition ends. DestinationState of Nothing means the end state of the rule. - Type
Specifies the Type. - PropertyName
[Optional] Specifies the PropertyName. - PropertyId
[Optional] Specifies the PropertyId. - PropertyValue
[Optional] Specifies the PropertyValue. - Weight
[Optional] Specifies the Weight.
Return Value
None.