I tried the above but I am getting a new error message now:
Exception in thread "main" javax.speech.EngineStateError: Invalid engine
state: DEALLOCATED
at com.sun.speech.engine.BaseEngine.checkEngineState(BaseEngine.java:608)
at com.sun.speech.engine.recognition.BaseRecognizer.getRuleGrammar(BaseRecogni
zer.java:298)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:128)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:88)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:235)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:96)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:219)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:98)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:235)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:96)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:219)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:98)
at com.sun.speech.engine.recognition.RuleParser.mparse(RuleParser.java:65)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:34)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:29)
at com.sun.speech.engine.recognition.BaseRuleGrammar.parse(BaseRuleGrammar.jav
a:383)
at myApp.main(myApp.java:82)
Thanks in Advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The message was changed on purpose. As for the exception itself, it tell you
that you don't properly follow the API in your application. You need to
allocate engine first before using it. It seems you are using engine without
allocating it first.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, has anyone else had a problem running JSGFDemo in beta5? I keep getting an
Invalid EngineState error.
Please try sphinx4 snapshot. This bug was fixed recently.
That worked, thanks!
This is still not working for me. I am using JSGFDdemo.jar revision 14 on
Windows Vista. Could anyone plz let me know what might be the problem?
I get this error and i am using Vista too. But on XP it was working.
Where can i found sphinx4 snapshot?
You can find snapshot on downloads page:
http://cmusphinx.sourceforge.net/wiki/download
Thanks!
I tried the above but I am getting a new error message now:
Exception in thread "main" javax.speech.EngineStateError: Invalid engine
state: DEALLOCATED
at com.sun.speech.engine.BaseEngine.checkEngineState(BaseEngine.java:608)
at com.sun.speech.engine.recognition.BaseRecognizer.getRuleGrammar(BaseRecogni
zer.java:298)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:128)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:88)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:235)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:96)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:219)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:98)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:235)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:96)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:219)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:98)
at com.sun.speech.engine.recognition.RuleParser.mparse(RuleParser.java:65)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:34)
at com.sun.speech.engine.recognition.RuleParser.parse(RuleParser.java:29)
at com.sun.speech.engine.recognition.BaseRuleGrammar.parse(BaseRuleGrammar.jav
a:383)
at myApp.main(myApp.java:82)
Thanks in Advance.
This is exactly the same bug as in the original post and which as fixed.
Sorry, I don't quite understand what issue do you have.
Yeah, the exception is still the same but the message got changed.
Anyway, I did use the snapshot and built it and used the JAR with my custom
application and I am getting this error now.
The message was changed on purpose. As for the exception itself, it tell you
that you don't properly follow the API in your application. You need to
allocate engine first before using it. It seems you are using engine without
allocating it first.
I had forgotten to allocate the BaseRecognizer which was causing this error.
Thanks for the help... :)