Closed timobaumann closed 6 years ago
That would be great, thank you!
Closed with #77
Nickolay, I must once more say that it is a pleasure to work with you and that I admire how generously you help the Sphinx project and open-source speech technology as a whole!
You are welcome, Timo, same for me. Hopefully we'll have a chance to grab a beer soon.
Getting access to the JSGFGrammar in default.config.xml is impossible when running code with assertions switched on.
Given that GrXmlGrammar derives from JSGFGrammar, context.getInstance(JSGFGrammar.class) / and ConfigurationManager.lookup() will find two instances in default.config.xml which then breaks the assertion in line 185 of ConfigurationManager.
I don't know if it's reasonable to check whether the object is of class JSGFGrammar as this would exclude lookup of subclasses. Instead, the fix to this would be to have both JSGF and GrXML grammars derive from some common subclass. I'm happy to provide such a patch.