Any time I tried to use the AppendDictionary the speech engine always crashes as soon as the LoadGrammar is called. I just want to have a simple fill in the blank that uses the default dictation.
GrammarBuilder builder = new GrammarBuilder();
builder.AppendDictation();
Grammar _grammar = new Grammar(builder);
_grammar.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(_grammar_SpeechRecognized);
_recognizer.LoadGrammar(_grammar);
The syntax seems pretty strait forward. This seems like it should be simple. Note this example has been greatly simplified to reflect the easiest possible scenario; this scenario crashes as does the more complex one.
Does it have to do with this?
AppendDictation - documentation.
Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
I assumed that because I have been running the program as an administrator this is not an issue. Both the recognizer and the program were started with administrator permissions so I am kind of discounting this as a problem.
Jaime Weise