put "sphinxbase", "pocketsphnix" and "PocketSphinxAndroidDemo" in the folder--"CMUSphinx".
use commands "./autogen.sh", "./configure", "make", "make install" both in "sphinxbase" and "pocketsphnix", and looks functional.
change "Android.mk" file.
execute "ndk-build -B", got the error below:
Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : pocketsphinx_jni <= pocketsphinx_wrap.c
jni/pocketsphinx_wrap.c:760:26: fatal error: pocketsphinx.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/pocketsphinx_jni/pocketsphinx_wrap.c] Error 1
I using root user in Fedora 16. Why there is no "pocketsphinx.h" file, maybe not generate it when "make"? And I found row 720 in "pocketsphinx_wrap.c", there is "#include pocketsphinx.h" and "#include sphinxbase/err.h". May someone give me a help?
Last edit: xiaozhenzhu 2012-11-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The three folders "pocketsphinx", "sphinxbase" and "PocketSphinxAndroidDemo" are in the path: "/home/xiaozhenzhu/Android/CMUSphinx".
So i changed line #5 in "PocketSphinxAndroidDemo/jni/Android.mk" to: SPINX_PATH := $(HOME)/Android/CMUSphinx
Am i right?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
libpocketsphinx_jni.so is in obj/local/armeabi and libs/armeabi
There is nothing strange
This issue is not related to JNI. It says that the java files for the corresponding classes are missing. Those files must be present in jni/edu/cmu/pocketsphinx, there should be files like Config.java and so on.
If the files are present, you need to add them to a project build path. If files are missing you have the issues with swig. Swig must create them.
anyone can help me with this ?
Please be patient and follow the instructions precisely and it will work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I there!,
I managed to compile the code after a couple of issues that I solved reading the above comment.
When I try it out, it doesn't recognise anything I say.
From the logcat, I see some Hypothesis
06-17 19:49:24.860: D/edu.cmu.pocketsphinx.demo.RecognizerTask$AudioTask(20589): Posting 1024 samples to queue
06-17 19:49:24.935: D/edu.cmu.pocketsphinx.demo.RecognizerTask(20589): Reading 1024 samples from queue
06-17 19:49:25.735: D/edu.cmu.pocketsphinx.demo.RecognizerTask(20589): Hypothesis: what
06-17 19:49:25.735: D/edu.cmu.pocketsphinx.demo.RecognizerTask(20589): Reading 1024
Can someone help me figure out what is the problem?
Thanks
Last edit: Patrick Tchankue 2013-06-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To allow others debug your accuracy issues you nee to provide more information. You need to uncomment "-rawlogdir" line in sources to enable the dump of raw files on sdcard. You need to share pocketsphinx.log file stored on sdcard and raw files collected in rawlogdir.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply :). I have attached the pocketsphinx.log file to this post. I tried to analysed it but I don't understand the information that it contains.
It is very strange because. I m in a room alone and there is not a lot of noise.
I even copy some acoustic model from the wall street journal. The app crashes while trying to load them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi friends.
i unzipped both Pocketsphinx and Sphinx under folder sphinx in somewhere on my hard drive.then did ./configure make and make install on both folders using cygwin.
also i edited Android.mk file and changed local path to /cygdrive/c/sphinx next changed "sphinxutil sphinxfe sphinxfeat sphinxlm pocketsphinx" to "pocketsphinx sphinxlm sphinxfeat sphinxfe sphinxutil". the local path doesnt consist any extra spaces.
and i have edited the path to swig 1.3 and ndk-r9e in properties of my project in builder section.Now when i build my project here is what i get:
"Compile thumb : pocketsphinx_jni <= pocketsphinx_wrap.c
C:/Users/Ali/workspace2/OVR//jni/pocketsphinx_wrap.c:760:26: fatal error: pocketsphinx.h: No such file or directory
compilation terminated.
make: *** [C:/Users/Ali/workspace2/OVR//obj/local/armeabi/objs/pocketsphinx_jni/pocketsphinx_wrap.o] Error 1
what should i do now?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there!I've got a problem while building the PocketSphinxAndroidDemo in eclipse (im doing this in Windows). I thoroughly followed the steps in building it here: https://sites.google.com/site/opiatefuchs/home/pocketsphinxandroiddemo . but its seems that i miss something that i dont know. Ive got the following error:
"Compile thumb : pocketsphinx_jni <= pocketsphinx_wrap.c
C:/Users/beautifulJeazel/Documents/Project/CMUSphinx/PocketSphinxAndroidDemo//jni/pocketsphinx_wrap.c:751:26: fatal error: pocketsphinx.h: No such file or directory
compilation terminated.
make: *** [C:/Users/beautifulJeazel/Documents/Project/CMUSphinx/PocketSphinxAndroidDemo//obj/local/armeabi/objs/pocketsphinx_jni/pocketsphinx_wrap.o] Error 1
I followed the solution written in this forum but i think it doesn't apply in my case. Is there any alternative way to solve this? Or could anyone gave me another source where i could download the demo same as the version used in the tutorial? thanks in advance :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : pocketsphinx_jni <= pocketsphinx_wrap.c
jni/pocketsphinx_wrap.c:760:26: fatal error: pocketsphinx.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/pocketsphinx_jni/pocketsphinx_wrap.c] Error 1
I using root user in Fedora 16. Why there is no "pocketsphinx.h" file, maybe not generate it when "make"? And I found row 720 in "pocketsphinx_wrap.c", there is "#include pocketsphinx.h" and "#include sphinxbase/err.h". May someone give me a help?
Last edit: xiaozhenzhu 2012-11-24
Please read the documentation:
http://cmusphinx.sourceforge.net/2011/05/building-pocketsphinx-on-android/
it says
You missed this step
The three folders "pocketsphinx", "sphinxbase" and "PocketSphinxAndroidDemo" are in the path: "/home/xiaozhenzhu/Android/CMUSphinx".
So i changed line #5 in "PocketSphinxAndroidDemo/jni/Android.mk" to: SPINX_PATH := $(HOME)/Android/CMUSphinx
Am i right?
No, you can not use variables in Makefiles, you need to specify the absolute path:
haha, this works!! Thanks a lot, Nickolay.
but variables are definetely used in the original makefile (???)
hello,
sorry to dig this one, but i carefully followed the procedure but i still got the same error
the root folder is /home/phil/arduino/sphinx/
containing
drwxrwxr-x 13 1000 1000 4096 Dec 18 08:52 pocketsphinx-0.8
drwxr-xr-x 10 1000 1000 4096 Dec 18 09:24 PocketSphinxAndroidDemo
drwxrwxr-x 11 1000 1000 4096 Dec 18 08:51 sphinxbase-0.8
i modified Android.mk as :
SPHINX_PATH := /home/phil/arduino/sphinx
and this line too
LOCAL_STATIC_LIBRARIES := pocketsphinx sphinxlm sphinxfeat sphinxfe sphinxutil
but as a result :
/home/phil/arduino/sphinx/PocketSphinxAndroidDemo# ../../../android-ndk-r8c/ndk-build -B
Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : pocketsphinx_jni <= pocketsphinx_wrap.c
jni/pocketsphinx_wrap.c:760:26: fatal error: pocketsphinx.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/pocketsphinx_jni/pocketsphinx_wrap.o] Error 1
plz help me :-(
You should rename pocketsphinx-0.8 to pocketsphinx and sphinxbase-0.8 to sphinxbase. It should look like
Then it will find the header appropriately.
oh man it worked
thank you soooo much
i got a strange issue
import edu.cmu.pocketsphinx.Config;
import edu.cmu.pocketsphinx.Decoder;
import edu.cmu.pocketsphinx.Hypothesis;
import edu.cmu.pocketsphinx.pocketsphinx;
cannot be resolved
libpocketsphinx_jni.so is in obj/local/armeabi and libs/armeabi
what am i missing ???
anyone can help me with this ?
i got a .so but no jar to include in the eclipse project
There is nothing strange
This issue is not related to JNI. It says that the java files for the corresponding classes are missing. Those files must be present in jni/edu/cmu/pocketsphinx, there should be files like Config.java and so on.
If the files are present, you need to add them to a project build path. If files are missing you have the issues with swig. Swig must create them.
Please be patient and follow the instructions precisely and it will work.
I there!,
I managed to compile the code after a couple of issues that I solved reading the above comment.
When I try it out, it doesn't recognise anything I say.
From the logcat, I see some Hypothesis
06-17 19:49:24.860: D/edu.cmu.pocketsphinx.demo.RecognizerTask$AudioTask(20589): Posting 1024 samples to queue
06-17 19:49:24.935: D/edu.cmu.pocketsphinx.demo.RecognizerTask(20589): Reading 1024 samples from queue
06-17 19:49:25.735: D/edu.cmu.pocketsphinx.demo.RecognizerTask(20589): Hypothesis: what
06-17 19:49:25.735: D/edu.cmu.pocketsphinx.demo.RecognizerTask(20589): Reading 1024
Can someone help me figure out what is the problem?
Thanks
Last edit: Patrick Tchankue 2013-06-17
Hello
To allow others debug your accuracy issues you nee to provide more information. You need to uncomment "-rawlogdir" line in sources to enable the dump of raw files on sdcard. You need to share pocketsphinx.log file stored on sdcard and raw files collected in rawlogdir.
Hi Nickolay,
Thanks for the reply :). I have attached the pocketsphinx.log file to this post. I tried to analysed it but I don't understand the information that it contains.
Beside pocketsphinx log you need to provide raw files.
Ah sorry
I have attached it here
Your recording is too noisy to provide a good recognition of accented speech. Try to find a quiet place for your experiments.
It is very strange because. I m in a room alone and there is not a lot of noise.
I even copy some acoustic model from the wall street journal. The app crashes while trying to load them.
hi friends.
i unzipped both Pocketsphinx and Sphinx under folder sphinx in somewhere on my hard drive.then did ./configure make and make install on both folders using cygwin.
also i edited Android.mk file and changed local path to /cygdrive/c/sphinx next changed "sphinxutil sphinxfe sphinxfeat sphinxlm pocketsphinx" to "pocketsphinx sphinxlm sphinxfeat sphinxfe sphinxutil". the local path doesnt consist any extra spaces.
and i have edited the path to swig 1.3 and ndk-r9e in properties of my project in builder section.Now when i build my project here is what i get:
"Compile thumb : pocketsphinx_jni <= pocketsphinx_wrap.c
C:/Users/Ali/workspace2/OVR//jni/pocketsphinx_wrap.c:760:26: fatal error: pocketsphinx.h: No such file or directory
compilation terminated.
make: *** [C:/Users/Ali/workspace2/OVR//obj/local/armeabi/objs/pocketsphinx_jni/pocketsphinx_wrap.o] Error 1
what should i do now?
Hello, I've got the same problem, i was wondering if u have solved it. thanks
Hi there!I've got a problem while building the PocketSphinxAndroidDemo in eclipse (im doing this in Windows). I thoroughly followed the steps in building it here: https://sites.google.com/site/opiatefuchs/home/pocketsphinxandroiddemo . but its seems that i miss something that i dont know. Ive got the following error:
"Compile thumb : pocketsphinx_jni <= pocketsphinx_wrap.c
C:/Users/beautifulJeazel/Documents/Project/CMUSphinx/PocketSphinxAndroidDemo//jni/pocketsphinx_wrap.c:751:26: fatal error: pocketsphinx.h: No such file or directory
compilation terminated.
make: *** [C:/Users/beautifulJeazel/Documents/Project/CMUSphinx/PocketSphinxAndroidDemo//obj/local/armeabi/objs/pocketsphinx_jni/pocketsphinx_wrap.o] Error 1
I followed the solution written in this forum but i think it doesn't apply in my case. Is there any alternative way to solve this? Or could anyone gave me another source where i could download the demo same as the version used in the tutorial? thanks in advance :)