Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

SrgsRuleRef Constructor (Uri, String, String)

Initializes a new instance of the SrgsRuleRef class, specifying the location of the external grammar file, the identifier of the rule, and the string alias of the semantic dictionary.

Namespace:  Microsoft.Speech.Recognition.SrgsGrammar
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

Syntax

'Declaration
Public Sub New ( _
    uri As Uri, _
    rule As String, _
    semanticKey As String _
)
'Usage
Dim uri As Uri
Dim rule As String
Dim semanticKey As String

Dim instance As New SrgsRuleRef(uri, rule, _
    semanticKey)
public SrgsRuleRef(
    Uri uri,
    string rule,
    string semanticKey
)

Parameters

  • uri
    Type: System.Uri
    The location of a grammar file outside the containing grammar.
  • rule
    Type: System.String
    The identifier of the rule to reference.
  • semanticKey
    Type: System.String
    An alias string for the semantic dictionary.

Exceptions

Exception Condition
ArgumentNullException

uri is a null reference (Nothing in Visual Basic).

semanticKey is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

semanticKey is empty.

Remarks

This constructor creates a rule reference to an external grammar file. To create a rule reference to an SrgsRule object within the same grammar, use any of the following constructors:

See Also

Reference

SrgsRuleRef Class

SrgsRuleRef Members

SrgsRuleRef Overload

Microsoft.Speech.Recognition.SrgsGrammar Namespace

Other Resources

Create Grammars Using SrgsGrammar (Microsoft.Speech)