I have copied acoustic models in /tmp/acoustic/ folder dictioanry model in /tmp/cmudict.0.6d and language model in /tmp/en-us.lm.dmp
On running the code it shows following error: "java.lang.AssertionError: duplicate property-name for different properties: grammarLocation"
Stack Trace:-
java.lang.AssertionError: duplicate property-name for different properties: grammarLocation
at edu.cmu.sphinx.util.props.PropertySheet.setConfigurableClass(PropertySheet.java:576)
at edu.cmu.sphinx.util.props.PropertySheet.<init>(PropertySheet.java:51)
at edu.cmu.sphinx.util.props.ConfigurationManager.getPropertySheet(ConfigurationManager.java:93)
at edu.cmu.sphinx.util.props.ConfigurationManagerUtils.listAllsPropNames(ConfigurationManagerUtils.java:554)
at edu.cmu.sphinx.util.props.ConfigurationManagerUtils.setProperty(ConfigurationManagerUtils.java:607)
at edu.cmu.sphinx.api.Context.setLocalProperty(Context.java:191)
at edu.cmu.sphinx.api.Context.setAcousticModel(Context.java:87)
at edu.cmu.sphinx.api.Context.<init>(Context.java:60)
at edu.cmu.sphinx.api.Context.<init>(Context.java:43)
at edu.cmu.sphinx.api.AbstractSpeechRecognizer.<init>(AbstractSpeechRecognizer.java:37)
at edu.cmu.sphinx.api.StreamSpeechRecognizer.<init>(StreamSpeechRecognizer.java:33)
at org.apache.stanbol.enhancer.engines.speechtotext.SpeechToTextEngine.computeEnhancements(SpeechToTextEngine.java:143)
at org.apache.stanbol.enhancer.engines.speechtotext.SpeechToTextEngineTest.testDefaultEnhancements(SpeechToTextEngineTest.java:58)</init></init></init></init></init>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have copied acoustic models in /tmp/acoustic/ folder dictioanry model in /tmp/cmudict.0.6d and language model in /tmp/en-us.lm.dmp
On running the code it shows following error: "java.lang.AssertionError: duplicate property-name for different properties: grammarLocation"
Stack Trace:-
java.lang.AssertionError: duplicate property-name for different properties: grammarLocation
at edu.cmu.sphinx.util.props.PropertySheet.setConfigurableClass(PropertySheet.java:576)
at edu.cmu.sphinx.util.props.PropertySheet.<init>(PropertySheet.java:51)
at edu.cmu.sphinx.util.props.ConfigurationManager.getPropertySheet(ConfigurationManager.java:93)
at edu.cmu.sphinx.util.props.ConfigurationManagerUtils.listAllsPropNames(ConfigurationManagerUtils.java:554)
at edu.cmu.sphinx.util.props.ConfigurationManagerUtils.setProperty(ConfigurationManagerUtils.java:607)
at edu.cmu.sphinx.api.Context.setLocalProperty(Context.java:191)
at edu.cmu.sphinx.api.Context.setAcousticModel(Context.java:87)
at edu.cmu.sphinx.api.Context.<init>(Context.java:60)
at edu.cmu.sphinx.api.Context.<init>(Context.java:43)
at edu.cmu.sphinx.api.AbstractSpeechRecognizer.<init>(AbstractSpeechRecognizer.java:37)
at edu.cmu.sphinx.api.StreamSpeechRecognizer.<init>(StreamSpeechRecognizer.java:33)
at org.apache.stanbol.enhancer.engines.speechtotext.SpeechToTextEngine.computeEnhancements(SpeechToTextEngine.java:143)
at org.apache.stanbol.enhancer.engines.speechtotext.SpeechToTextEngineTest.testDefaultEnhancements(SpeechToTextEngineTest.java:58)</init></init></init></init></init>
This issue must be fixed in trunk, please update.
And, we recommend you to use en-us generic acoustic model, not wsj, it provides way better accuracy.
Thanks Nick, I will be using 'en-us' for acosutic, cmusphinx-5.0-en-us.lm.gz for language and cmudict.0.7a for dictionary.
I am using OSS Repository of Sphinx4 and issue has not been fixed in repository. Sphinx can do the recognition but fails in junit test cases.
Hey Suman
I've updated sphinx4 packages on OSS, please try again. Let me know if there are any issues.