Hi
I have been having trouble running Sphinx on Android using JavaFX with the Eclipse IDE. I have been getting a resoruce not found error.
Property exception component:'acousticModelLoader' property:'location' - Can't locate resource:/edu/cmu/sphinx/models/en-us/en-us Here is a image of my project layout in Eclipse.
Property exception component:'acousticModelLoader' property:'location' - Can't locate resource:/edu/cmu/sphinx/models/en-us/en-us
Here is a image of my project layout in Eclipse.
My build.gradle file has the following lines
dependencies { compile group: 'edu.cmu.sphinx', name: 'sphinx4-core', version:'5prealpha-SNAPSHOT' compile group: 'edu.cmu.sphinx', name: 'sphinx4-data', version:'5prealpha-SNAPSHOT' compile 'com.gluonhq:charm-down-common:1.0.0' androidRuntime 'com.gluonhq:charm-down-android:1.0.0' desktopRuntime 'com.gluonhq:charm-down-desktop:1.0.0' } repositories { jcenter() mavenLocal() maven { url "https://oss.sonatype.org/content/repositories/snapshots" } }
The program runs but fails at the LiveSpeechRecognizer line.
private static final String ACOUSTIC_MODEL = "resource:/edu/cmu/sphinx/models/en-us/en-us"; private static final String DICTIONARY_PATH = "resource:/edu/cmu/sphinx/models/en-us/cmudict-en-us.dict"; pivate static final String GRAMMAR_PATH = "resource:/com/varv"; rivate static final String LANGUAGE_MODEL = "resource:/edu/cmu/sphinx/models/en-us/en-us.lm.bin"; Configuration configuration = new Configuration(); configuration.setAcousticModelPath(ACOUSTIC_MODEL); configuration.setDictionaryPath(DICTIONARY_PATH); configuration.setGrammarPath(GRAMMAR_PATH); configuration.setUseGrammar(true); configuration.setGrammarName("varv"); LiveSpeechRecognizer jsgfRecognizer = new LiveSpeechRecognizer(configuration);
I have tried several ways to solve this problem, been working on it for the last 2 days.
Thanks for your help.
Sphinx4 is too slow for android, you can use pocketsphinx, tutorial is here
http://cmusphinx.sourceforge.net/wiki/tutorialandroid
Log in to post a comment.
Hi
I have been having trouble running Sphinx on Android using JavaFX with the Eclipse IDE.
I have been getting a resoruce not found error.
My build.gradle file has the following lines
The program runs but fails at the LiveSpeechRecognizer line.
I have tried several ways to solve this problem, been working on it for the last 2 days.
Thanks for your help.
Sphinx4 is too slow for android, you can use pocketsphinx, tutorial is here
http://cmusphinx.sourceforge.net/wiki/tutorialandroid