Error Loading Grammar File For Speech Recognition
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Speech recognition engine times out when loading grammar (Microsoft.Speech) up vote 0 down vote favorite I'm working with Microsoft.Speech.Recognition and need to use quite large grammars for a recognition task. So I create and later modify a grammar as a SrgsDocument and then construct a Grammar object from that. At that point, I load the grammar into the engine to prepare for recognition using the SpeechRecognitionEngine.LoadGrammar method. In other words I have something like: SpeechRecognitionEngine sre = new SpeechRecognitionEngine(); SrgsDocument gramDoc = new SrgsDocument(); //...modify the SrgsDocument (add rules, etc.) Grammar gram = new Grammar(gramDoc); sre.LoadGrammar(gram); And at this point, loading the grammar, after a few minutes I sometimes (not always, and not really as a function of grammar size) get the error "A task could not complete because the SR engine had timed out." If I catch the exception and try to load the same grammar into the same engine again, sometimes it loads successfully (though very slowly), and sometimes it gives the same error again. What's causing this? Why would it sometimes time out and sometimes work with the same grammar/engine? And is there something I can do to make the grammar load faster, period? Any ideas would be really appreciated. .net speech-recognition speech microsoft-speech-platform share|improve this question asked Oct 17 '13 at 10:31 pilikia 638 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote What's causing this? Grammar is too large. Why would it sometimes time out and sometimes work with the same grammar/engine? Sometimes it is smaller. And is there something I can do to make the grammar load faster, period? I presume you compile the gramar with Grammar Tools You can use smaller grammar. You actu
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. Developing with the Microsoft Speech Application SDK Creating Speech http://stackoverflow.com/questions/19424280/speech-recognition-engine-times-out-when-loading-grammar-microsoft-speech Applications (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Enabling Speech Recognition (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Enabling Speech Recognition (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Validating Grammars (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Validating Grammars (UserManual; Speech Application https://msdn.microsoft.com/en-us/library/ms873286.aspx SDK) (LogAnalysis; Speech Application SDK) Validating Grammars (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Speech Grammar Editor (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Pronunciation Editor (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Using Grammar Files (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Creating Grammar Files (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Manipulating Elements in Rule Editor (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Validating Grammars (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Adding Semantic Interpretation Information (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Debugging Dynamic Grammars (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Using Grammar Elements to Recognize Speech (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Compiling Grammars (UserManual; Speech Application SDK) (LogAnalysis; Speech Application SDK) Speech Grammar Editor Tips (UserManual; Speech Application SDK) (LogAnalysi
Tool DevelopmentEvents and OpportunitiesGeneral Discussion Sub forum : Move this topic Cancel Contributed Library Questions mrscrow Voce Library / Speech Recognition in Contributed Library Questions • 2 years ago Hi Guys, following this thread from the old forum http://processing.org/discourse/yabb2/YaBB.pl?num=1191403856/0 I started to play around with Voce http://voce.sourceforge.net/ and it https://forum.processing.org/topic/voce-library-speech-recognition seems to work even though not veryaccurate. Now I would like to understand a bit more what's actually happening behind and how I can implement own grammar files (.gram) which tetermin what the application can understand etc. Therefor I would like to start discussing here and would be very happy if people join in who already used / experimented with this lib. My first concern would be how to design the grammar file (which software, error loading which structure is best). I am adding here one file I have been using from the examples of Voce. It works quiet ok with "quit" and "reset" but it always also gets some "ghost input" which is a mix of other words. #JSGF V1.0; /** * JSGF Digits Grammar file */ grammar objects; public