Share via


Note

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

Grammar.Loaded Property

Gets whether a Grammar has been loaded by a recognition engine.

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

Syntax

'Declaration
Public ReadOnly Property Loaded As Boolean
    Get
'Usage
Dim instance As Grammar
Dim value As Boolean

value = instance.Loaded
public bool Loaded { get; }

Property Value

Type: System.Boolean
The Loaded property returns true if the referenced speech recognition grammar is currently loaded in a recognition engine; otherwise the property returns false. The default is false.

Remarks

Once a Grammar has been loaded, the values of Weight, and Priority cannot be changed.

Examples

In the example below, the application checks to see if the Grammar is loaded before changing the value for Priority.

if (!(_grammar.Loaded))
{
  Grammar.Priority=5;
}

See Also

Reference

Grammar Class

Grammar Members

Microsoft.Speech.Recognition Namespace