ISpeechGrammarRules Add Method (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

Interface: ISpeechGrammarRules

Add Method

The Add method creates a new ISpeechGrammarRule object in an ISpeechGrammarRules collection.

RuleName, or RuleId, or both must be specified to identify the rule. If RuleName is specified (not an empty string such as ""), it must be unique within the grammar. If RuleId is specified (a value other than zero), it must be unique within the grammar.

     RuleName As String,
     Attributes As SpeechRuleAttributes,
     [RuleId As Long = 0]
) As ISpeechGrammarRule


Specifies the RuleName of the new rule.
Specifies the Attributes of the new rule.
Specifies the RuleId of the new rule. Default value is zero.

Return Value

The Add method returns the newly-created ISpeechGrammarRule object.