Discussion:
Problem with SpeechRecognitionEngine and .grxml files with external rulerefs
(too old to reply)
Tomi Blinnikka
2011-04-25 17:18:31 UTC
Permalink
I believe I've found an issue with the managed speech recognition libraries. The short problem description is that I am unable to use SRGS/.grxml files that contain "ruleref" elements pointing to other files with System.Speech.Recognition.SpeechRecognitionEngine (InProc). They load fine when using SpeechRecognizer.

After debugging (and finally making a custom build of System.Speech.dll), I've narrowed down on the issue. When you use an InProc recognizer, RecognizerBase.cs sets a custom grammar loader (ISpGrammarResourceLoader). Unfortunately, the RecognizerBase.LoadResource method that is used will receive a null value for the last argument ("pbstrRedirectUrl"), and cause a null exception when it tries to do a split on the null string. This also explains why SpeechRecognizer does not have any issues with the same files.

The same issue happens with both 3.5 and 4.0 versions of the Framework.

Any help would be appreciated, even if it's confirming that an issue exists in the Framework.

Thanks,

//Tomi B.
rSyndrome
2013-02-15 16:48:15 UTC
Permalink
Hi Tomi,

Are you using the Microsoft Speech Platform SDK? If so, which version is it?

For my part, I recently installed the MSP v11 on my PC (Windows7 64bit, French language + runtime language en-US). I succeed to load a grammar compiled in the OS' native language (fr-FR), but it crashes in spsreng.dll (access violation reading location 0x0) right after I load the equivalent, en-US grammar (all functions return success though). These grammars contain rulerefs as well.

I'm really curious how you've made a custom build of the dll?

Thanks,

Loading...