Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content

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.

© 2015 Microsoft