Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 AppendDictation Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.Net Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
GrammarBuilder..::.AppendDictation Method

Appends grammar logic to provide access the default free text dictation grammar provided by the Speech platform.

Namespace:  System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)
Visual Basic (Declaration)
Public Sub AppendDictation
Visual Basic (Usage)
Dim instance As GrammarBuilder

instance.AppendDictation()
C#
public void AppendDictation()
Visual C++
public:
void AppendDictation()
JScript
public function AppendDictation()

GrammarBuilder with dictation grammar appended using the AppendDictation()()() method can be freely intermixed without restriction GrammarBuilder instance specifying exact semantics.

Such as GrammarBuilder can be used freely with SemanticResultValue and SemanticResultKey.

The example below creates a Grammar emulating a Dictaphone from GrammarBuilder instances by inserting a GrammarBuilder with dictation grammar appended with the AppendDictation method between to GrammarBuilder objects, supporting the commadns “start dictation” and “stop dictation”. The dictation result will be obtainable from the Value property of SemanticValue instance returned with a recognized phrase and accessed with the tag “DicationInput”.

private void dictaphone(){
    GrammarBuilder dictaphoneGB = new GrammarBuilder();
    GrammarBuilder dictation = new GrammarBuilder();
    dictation.AppendDictation();
    
    dictaphoneGB.Append(new SemanticResultKey("StartDictation", new SemanticResultValue("Start Dictation",true)));
    dictaphoneGB.Append(new SemanticResultKey("DictationInput", dictation));
    dictaphoneGB.Append(new SemanticResultKey("EndDictation", new SemanticResultValue("End Dictation", false)));
    Grammar grammar=new Grammar(dictaphoneGB);
    grammar.Enabled=true;
    grammar.Name="Dictatphone ";
    _recognizer.LoadGrammar(grammar);
   
}

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
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker