I`m using Microssoft.Speech.Recognition to recognize some speech. I have SDK v11 installed and it works pretty good until I try to AppendDictation to GrammarBuilder:
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
sre = new SpeechRecognitionEngine(new System.Globalization.CultureInfo("en-US"));
sre.SetInputToDefaultAudioDevice();
GrammarBuilder gb = new GrammarBuilder();
gb.Append("start");
gb.AppendDictation();
gb.Append("end");
Grammar g = new Grammar(gb);
sre.LoadGrammar(g);
And it crashes at line sre.LoadGrammar(g)
.
FileNotFound exception
Error text: Cannot find grammar referenced by this grammar.
Am i doing something wrong? I will be grateful for Your help!
Unfortunately, the server version of Microsoft's Speech SDK doesn't support dictation grammars at the moment. You should try using the System.Speech.Recognition
namespace instead of the Microsoft.Speech.Recognition
namespace. You will need to have speech recognition installed on your server if it is not already installed.