Cloudgarden's Discussion Board
Forums: Search: Several forums are available for people to post questions/comments about Java Speech or any of the CloudGarden products. As more messages are posted this discussion board should provide a useful, searchable, support database.
o AliceTalker (42)
o JSAPI Projects (69)
o Java Speech API (857)
o Jigloo GUI Builder for Eclipse (3322)
o SwingScroller (0)
o US Election 2004 (3)
Searches text and subject fields in all forums. The search matches as many words as possible. Don't use "AND" or "OR".
Latest "JSAPI Projects" Topics [ Start new "JSAPI Projects" Topic  ]

Cloudgarden Discussion Board  
This topic has 2 replies.       [ << Previous Topic | Start of Thread | >> Next Topic ]
Loading JSFGs dont work with Dragon NaturallySpeaking 8
Author: Jason
02/08/05 17:46 Reply
I have tried the speech recognition examples in TalkingJava JSAPI. The dictation works fine with Dragon NaturallySpeaking 8, but the LoadJSGF doesnot. I get:
java.lang.RuntimeException: Failed to commit grammar grammars.helloWorld, error code = -2147220454
     at com.cloudgarden.speech.CGRecognizer.commitChanges(Unknown Source)
     at examples.recognition.LoadJSGFFromURL.main(LoadJSGFFromURL.java:57)

LoagJSGF works fine with Dragon NaturallySpeaking 7.3.

Any ideas?

Re: Loading JSFGs dont work with Dragon NaturallySpeaking 8
Author:James
Reply 1 of 203/14/05 10:29Reply
Jason,

I had the exact same problem loading grammars in Dragon 8.

Here's what you can do to get around the problem. Start Dragon 8 before you run the example. This is the only way I have found to load grammars in Dragon 8 and not get the failed to commit grammar error. However, a myriad of other problems arise after you actually load the grammar.

The first is microphone input is totally killed for the recognizer. If you try to turn the mic on from dragon bar you get a message saying you can't turn the microphone on. I have not tried feeding the recognizer with manual input from something other than an audiostream yet once JSGF grammars are loaded, but I will try this soon and get back on how it went. Audiostreaming hasn't worked for me yet once I load the grammars, working on this now.

Second, killing Dragonbar also messes up something internally with the recognizer and you will get errors if you try to stream audio via a datasink. I don't recall exactly which errors, I will try it again and put something here when I have more info.

Lastly, if you use dictation grammar with Dragon 8 you must disable the grammar ( dictationEnabled(false) ) every time you have processed one item, be it audio, text, or otherwise, via a datasink. Then re-enable it at the start of a new streaming task. So, if you had five audio files you wanted to run through the recognizer you would enable dictation, stream the file to the recognizer, close and drain datasource, audio manager, and datasink, then disable dictation grammar. For the next file the same steps must be taken, enable dictation, etc etc etc. Something about SAPI 4 engines not finishing recognition until grammars are unloaded. This worked for me once I got the disabling of grammars at the right spot.

My next step with JSGF grammars is to try the same method of enabling and disabling, I will post how that turns out.

James

Re: Loading JSFGs dont work with Dragon NaturallySpeaking 8
Author:Don
Reply 2 of 205/23/10 13:18Reply
Hi,
You posted this a long time ago but I have just hit the same problem.
In my case, it turned out that the grammar checking is not all it could be.
I got the same error and almost the same error code.
The problem - in my .gram file I had the statement
<albert> = ;
This worked fine with the IBM JSF but it seems it causes CloudGarden problems.
I changed it to something more meaningful
<albert> = Albert;
and it now works fine.
May be CG needs to pick up things like this that cause problems to the
commitChanges routine.
A list of the error codes and their meanings would also help.
Regards
Don