Stephen Dause - 2015-11-29

Hello,

I am trying to have one grammar file import another grammar, but it appears
that this is not working. I am running a project based heavily on the
pocketsphinx demo.

I have the following line in the grammar file (commands.gram) which I am
using to search by calling SpeechRecognizer.addGrammarSearch().

import <foo.bar.*>;</foo.bar.*>

foo.bar is a grammar which is defined in another file, bar.gram.

commands.gram appears to be loaded and a search containing only rules
defined in commands.gram itself works fine. But when I try to use a rule
defined in bar.gram, a null Hypothesis is returned. How do I tell the
recognizer to load bar.gram?

Also, I have included tags in my grammar (in accordance with http://www.w3.org/TR/jsgf/#16890), but I can not tell where that information is in the Hypothesis, if it is at all. Where should I look for it?

Thanks very much,

~Stephen

 

Last edit: Stephen Dause 2015-11-29