I want to create a voice recognition application using the pocketsphinx-android-demo-5prealpha. I only need this app to work with Spanish.
I replaced the default acoustic and language models with the Spanish packet of voxforge (voxforge-es-0.2.tar.gz).
In English, by default the app works correctly in my phone: Samsung Galaxy S4 (i9505) with Android KitKat 442.
When I replace the language and acoustic corpus and I recompile the project the app crashes and I obtain the next error via logcat. I changed the "KEYPHRASE" to "comenzar" (meaning "start" or "start up") to test the app too.
Here is the error:
02-19 17:28:57.188: I/SpeechRecognizer(29405): Start recognition "menu"
02-19 17:28:57.188: D/AndroidRuntime(29405): Shutting down VM
02-19 17:28:57.188: W/dalvikvm(29405): threadid=1: thread exiting with uncaught exception (group=0x418acda0)
02-19 17:28:57.198: E/AndroidRuntime(29405): FATAL EXCEPTION: main
02-19 17:28:57.198: E/AndroidRuntime(29405): Process: edu.cmu.pocketsphinx.demo, PID: 29405
02-19 17:28:57.198: E/AndroidRuntime(29405): java.lang.RuntimeException: Decoder_setSearch returned -1
02-19 17:28:57.198: E/AndroidRuntime(29405): at edu.cmu.pocketsphinx.PocketSphinxJNI.Decoder_setSearch(Native Method)
02-19 17:28:57.198: E/AndroidRuntime(29405): at edu.cmu.pocketsphinx.Decoder.setSearch(Unknown Source)
02-19 17:28:57.198: E/AndroidRuntime(29405): at edu.cmu.pocketsphinx.SpeechRecognizer.startListening(Unknown Source)
02-19 17:28:57.198: E/AndroidRuntime(29405): at edu.cmu.pocketsphinx.demo.PocketSphinxActivity.switchSearch(PocketSphinxActivity.java:145)
02-19 17:28:57.198: E/AndroidRuntime(29405): at edu.cmu.pocketsphinx.demo.PocketSphinxActivity.onPartialResult(PocketSphinxActivity.java:114)
02-19 17:28:57.198: E/AndroidRuntime(29405): at edu.cmu.pocketsphinx.SpeechRecognizer$ResultEvent.execute(Unknown Source)
02-19 17:28:57.198: E/AndroidRuntime(29405): at edu.cmu.pocketsphinx.SpeechRecognizer$RecognitionEvent.run(Unknown Source)
02-19 17:28:57.198: E/AndroidRuntime(29405): at android.os.Handler.handleCallback(Handler.java:733)
02-19 17:28:57.198: E/AndroidRuntime(29405): at android.os.Handler.dispatchMessage(Handler.java:95)
02-19 17:28:57.198: E/AndroidRuntime(29405): at android.os.Looper.loop(Looper.java:157)
02-19 17:28:57.198: E/AndroidRuntime(29405): at android.app.ActivityThread.main(ActivityThread.java:5356)
02-19 17:28:57.198: E/AndroidRuntime(29405): at java.lang.reflect.Method.invokeNative(Native Method)
02-19 17:28:57.198: E/AndroidRuntime(29405): at java.lang.reflect.Method.invoke(Method.java:515)
02-19 17:28:57.198: E/AndroidRuntime(29405): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
02-19 17:28:57.198: E/AndroidRuntime(29405): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
02-19 17:28:57.198: E/AndroidRuntime(29405): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
02-19 17:28:57.198: E/AndroidRuntime(29405): at dalvik.system.NativeStart.main(Native Method)
Where is the problem? I don't change any method, variable or kind of code.