I want to run sphinx4 in batch mode while using the JSGF grammar. For instance, I have 5 utterances, utt_1, utt_2, utt_3, utt_4, utt_5. And for each utterance, I have write a grammar file, such as grammar_1, grammar_2, grammar_3, grammar_4, grammar_5. How to config sphinx and/or write code to decode utt_x using grammar_x?
I googled, but most things I found refer to the old JSGF demo, which doesn't seem to work now. My current configuration is to use flatLinguist with jsgfGrammar. Should I skip "grammarName" in the config.xml file in my case? Then how to load the grammar for each utterance?
Thanks!
Long
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone,
I want to run sphinx4 in batch mode while using the JSGF grammar. For instance, I have 5 utterances, utt_1, utt_2, utt_3, utt_4, utt_5. And for each utterance, I have write a grammar file, such as grammar_1, grammar_2, grammar_3, grammar_4, grammar_5. How to config sphinx and/or write code to decode utt_x using grammar_x?
I googled, but most things I found refer to the old JSGF demo, which doesn't seem to work now. My current configuration is to use flatLinguist with jsgfGrammar. Should I skip "grammarName" in the config.xml file in my case? Then how to load the grammar for each utterance?
Thanks!
Long
OK, it seems that I can create a default/dummy grammar file in YOUR_PATH/default/gram.gram. Then for each utterance, I can do
All these need to happen after recognizer.allocate();