SrgsRule Class

Represents the grammar element that defines the limited set of possible phrases a user can say to produce a successful recognition. Use the SrgsRule class to create a new rule at run time or to modify a rule in an existing grammar stream or file at run time.

Namespace: System.Speech.Recognition.SrgsGrammar
Assembly: System.Speech (in system.speech.dll)

'Declaration
<SerializableAttribute> _
Public Class SrgsRule
'Usage
Dim instance As SrgsRule

/** @attribute SerializableAttribute() */ 
public class SrgsRule
SerializableAttribute 
public class SrgsRule
Not applicable.

The phrases defined by grammar rules form the basis of the recognizer's language model in the System.Speech.Recognition.SrgsGrammar namespace. This basis limits the set of possible phrases that the recognizer must be able to recognize.

A rule consists of child elements that specify the sequence in which the phrases must be spoken. These elements are represented by objects such as SrgsItem, SrgsOneOf, and SrgsRuleRef elements. Use the Elements property to access the collection of child elements a rule contains.

You can specify whether a rule can be activated for recognition and when it can be referenced by other rules by using the Scope property.

This class represents the rule element that is defined in the World Wide Web Consortium (W3C) Speech Recognition Grammar Specification (SRGS).

System.Object
  System.Speech.Recognition.SrgsGrammar.SrgsRule

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show: