none
Microsoft.Speech - AppendDictation()

    Question

  • I should preface this by saying this isnt actually for Kinect -- though it is for Microsoft.Speech, and I see some similar, though old threads on this topic, so I figured I'd give it a go.

    I'm using Microsoft.Speech, as opposed to System.Speech, as this application will reside on a server.  I am trying to load dictation grammar into my recognizer, though this seems to consistently fail, saying it "Cannot find grammar referenced by this grammar."  This is my C# code, below:

    GrammarBuilder gb = new GrammarBuilder();
    
    gb.AppendDictation();
    
    Grammar g = new Grammar(gb);
    
    g.Name = "Dictation Grammar";
    
    recognizer.LoadGrammar(g);

    What's even more odd is that even copying and pasting the example code in the documentation (http://msdn.microsoft.com/en-us/library/dd167762.aspx) causes the same problem.  I see older -- circa 2009 -- threads saying Microsoft.Speech doesnt support dictation grammar, but I assume that is outdated seeing as how there is an AppendDictation() method in GrammarBuilder in v11.  What am I doing wrong?


    Monday, February 20, 2012 4:20 AM

Answers

  • For whomever is looking for this in the future; after emailing back and forth with Microsoft, I got this response:

    The managed interfaces (Microsoft.Speech and System.Speech) are built on top of the native SAPI interfaces.  These interfaces are the same for both the Server engine and the Desktop engine.

     

    BUT the engine itself is responsible for implementing dictation, and the Server engine does not do so.  Therefore, the call will fail when you load the grammar.

    Wednesday, February 29, 2012 6:04 PM