Hi all,
When I'm using the SpeechRecognitionEngine and make a call to LoadGrammar, I get a COMException that contains the following:
System.Runtime.InteropServices.COMException was unhandled
Message="Exception from HRESULT: 0x8004041B"
Source="System.Speech"
ErrorCode=-2147220453
StackTrace:
at System.Speech.Internal.SapiInterop.ISpRecoGrammar.LoadCmdFromMemory(IntPtr pGrammar, SPLOADOPTIONS Options)
at System.Speech.Internal.SapiInterop.SapiGrammar.<>c__DisplayClass7.<LoadCmdFromMemory>b__6()
at System.Speech.Internal.SapiInterop.SapiProxy.PassThrough.Invoke2(VoidDelegate pfn)
at System.Speech.Recognition.RecognizerBase.LoadSapiGrammarFromCfg(SapiGrammar sapiGrammar, Grammar grammar, Uri baseUri, Boolean enabled, Single weight, Int32 priority)
at System.Speech.Recognition.RecognizerBase.LoadSapiGrammar(Grammar grammar, SapiGrammar sapiGrammar, Boolean enabled, Single weight, Int32 priority)
at System.Speech.Recognition.RecognizerBase.LoadGrammar(Grammar grammar)
at System.Speech.Recognition.SpeechRecognitionEngine.LoadGrammar(Grammar grammar)
at WindowsFormsApplication3.Form1.SetCommands(String[] commands) in G:\OptimusOne\WindowsFormsApplication3\Form1.cs:line 469
at WindowsFormsApplication3.Form1.InitSpeechRecognitionThread() in G:\OptimusOne\WindowsFormsApplication3\Form1.cs:line 208
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
I haven't been able to find any documentation online about this particular COMException. Has anyone seen this before? Any ideas on what I could do to fix this? It only happens on XP, not Vista.