This documentation is archived and is not being maintained.

DictationGrammar Class

Represents a speech recognition grammar used for free text dictation.

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

public class DictationGrammar : Grammar

This class provides applications with a predefined language model that can process spoken user input into text. This class supports both default and custom DictationGrammar objects. For information about selecting a dictation grammar, see the DictationGrammar(String) constructor.

By default, the DictationGrammar language model is context free. It does not make use of specific words or word order to identify and interpret audio input. To add context to the dictation grammar, use the SetDictationContext method.


DictationGrammar objects do not support the Priority property. DictationGrammar throws a NotSupportedException if Priority is set.


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 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0