I have managed to compile pocketsphinxdemo for android 2.1 and have successfully created a .apk file but when i try to run the application (after installation), it just flashes the app screen and then closes. After trying many times to run the same app again, it starts the app(and does not close this time) but again when we press the "Hold and speak" button the app crashes again (both times ie when we hold the button for long time or just click once and leave it).
I had created the sdcard ISO (named sdcard1.iso and used the same name in my code) for running on the emulator, but I am not sure where to put the files in the actual sdcard to run the app on the device and what corresponding changes I need to make in my code.
P.S:
1. I created the sdcard1.iso using MKSDCARD from android tools and added the hmm and lm folders in my sdcard1.iso using PowerISO.
2. I am using eclipse on windows to run the project.
I have managed to compile pocketsphinxdemo for android 2.1 and have
successfully created a .apk file but when i try to run the application (after
installation), it just flashes the app screen and then closes. After trying
many times to run the same app again, it starts the app(and does not close
this time) but again when we press the "Hold and speak" button the app crashes
again (both times ie when we hold the button for long time or just click once
and leave it).
Most likely it exits because it fails to find th model files. Files need to be
in specified location. You can check exact reason in the file
"pocketsphinx.log" where all the debug information is stored. See the source
for the location of this file.
So this is the path to the file on SD card. Sorry, what trouble do you have
with it? Do you know how to put files in this location or what? On device it
must be "sdcard", not "sdcard1".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply.
1.I cannot find any log file in the location
"/sdcard1/Android/data/pocketsphinx.log".
I also tried creating a blank .log file and saved it in that location and
after running the app, the file is still blank.
So I cannot find any log of why the app is closing.
2. I specified the following code because the file locations specified below are in sdcard1.ISO and not on the actual memory card(which should be the case when I deploy the app on my device instead of using emulator). So if I want to put the model files in the actual sd-card then where exactly do I put them (directly create folders in the root location or somewhere else in the memory card).
pocketsphinx
.setLogfile("/sdcard1/Android/data/pocketsphinx.log");
Config c = new Config();
i have an android 2.1 phone and wanted to run pocketsphinx on it. i downloaded
the 'pocketsphinxdemo' from the link on the cmu site and created a new project
for 2.1 using the files from 'pocketsphinxdemo' and making the necessary
changes in the code.
i do not get any build errors. But when i run my app, it doesn't give any
output .On checking the log i found that the hyp.getHypstr() function that
gives the final result returns a null value. The pocketsphinx log also seems
to be fine and it is reading the model files from the sdcard.
I'm not able to trace the error. Please help .
the log files are attached .(it is in ms word since understanding in notepad
was difficult )
There is nothing wrong in the behaviour you described. It just didn't
recognize anything and returned you null.
I see from the log that you've recorded for quite some time. You need to do it
quickly - push the button, say something and release the button. You can try
on host machine first.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks a lot!!
after many retries i finally got it.......but the accuracy is very low... also
in my application i wanted to recognize the calling party's voice so i changed
the input to VOICE_DOWNLINK(MediaRecorder.AudioSource class) instead of
default .
pocketsphinx now gives some random output. Its nothing close to what we
speak.Also when we don't speak, some output is still shown.
Any clue on why this happens and how to overcome it??
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a similar problem. When I first ran recognizing I get no output. When I
start recognizing after that, the app crashes.
Nijkio002002, what did you make to fix your problem?
Here is my pocketsphinx .log
Hi,
I have managed to compile pocketsphinxdemo for android 2.1 and have successfully created a .apk file but when i try to run the application (after installation), it just flashes the app screen and then closes. After trying many times to run the same app again, it starts the app(and does not close this time) but again when we press the "Hold and speak" button the app crashes again (both times ie when we hold the button for long time or just click once and leave it).
I had created the sdcard ISO (named sdcard1.iso and used the same name in my code) for running on the emulator, but I am not sure where to put the files in the actual sdcard to run the app on the device and what corresponding changes I need to make in my code.
P.S:
1. I created the sdcard1.iso using MKSDCARD from android tools and added the hmm and lm folders in my sdcard1.iso using PowerISO.
2. I am using eclipse on windows to run the project.
The code which uses the sdcard is as follows:
c.setString("-hmm",
"/sdcard1/Android/data/hmm/en_US/hub4wsj_sc_8k");
c.setString("-dict",
"/sdcard1/Android/data/lm/en_US/cmu07a.dic");
c.setString("-lm",
"/sdcard1/Android/data/lm/en_US/hub4.5000.DMP");
Most likely it exits because it fails to find th model files. Files need to be
in specified location. You can check exact reason in the file
"pocketsphinx.log" where all the debug information is stored. See the source
for the location of this file.
So this is the path to the file on SD card. Sorry, what trouble do you have
with it? Do you know how to put files in this location or what? On device it
must be "sdcard", not "sdcard1".
Thanks for the reply.
1.I cannot find any log file in the location
"/sdcard1/Android/data/pocketsphinx.log".
I also tried creating a blank .log file and saved it in that location and
after running the app, the file is still blank.
So I cannot find any log of why the app is closing.
2. I specified the following code because the file locations specified below are in sdcard1.ISO and not on the actual memory card(which should be the case when I deploy the app on my device instead of using emulator). So if I want to put the model files in the actual sd-card then where exactly do I put them (directly create folders in the root location or somewhere else in the memory card).
pocketsphinx
.setLogfile("/sdcard1/Android/data/pocketsphinx.log");
Config c = new Config();
c.setString("-hmm",
"/sdcard1/Android/data/hmm/en_US/hub4wsj_sc_8k");
c.setString("-dict",
"/sdcard1/Android/data/lm/en_US/cmu07a.dic");
c.setString("-lm",
"/sdcard1/Android/data/lm/en_US/hub4.5000.DMP");
Please help me access the log file as I have no clue of whether the app is
able to access the model files or not.
If you want to access my files the use following links:
https://docs.google.com/leaf?id=0B0X5E2LOC_1fMDEwZjI4MTEtMzk3Ni00YWM2LTgxZWEt
MWM5MWZjM2RmNjZl&hl=en&authkey=CJyW8fME
https://docs.google.com/leaf?id=0B0X5E2LOC_1fNjY3OTI5MWYtMzlkYy00YTNiLTkzYmMt
MWFkZjUyYWUxZDhl&hl=en&authkey=CPag_sIM
You have three attempts to guess that and I'll answer you if you are correct
or not
hi
i have an android 2.1 phone and wanted to run pocketsphinx on it. i downloaded
the 'pocketsphinxdemo' from the link on the cmu site and created a new project
for 2.1 using the files from 'pocketsphinxdemo' and making the necessary
changes in the code.
i do not get any build errors. But when i run my app, it doesn't give any
output .On checking the log i found that the hyp.getHypstr() function that
gives the final result returns a null value. The pocketsphinx log also seems
to be fine and it is reading the model files from the sdcard.
I'm not able to trace the error. Please help .
the log files are attached .(it is in ms word since understanding in notepad
was difficult )
thnx in advance.
android log.docx
pocketsphinx_log.docx
There is nothing wrong in the behaviour you described. It just didn't
recognize anything and returned you null.
I see from the log that you've recorded for quite some time. You need to do it
quickly - push the button, say something and release the button. You can try
on host machine first.
thanks a lot!!
after many retries i finally got it.......but the accuracy is very low... also
in my application i wanted to recognize the calling party's voice so i changed
the input to VOICE_DOWNLINK(MediaRecorder.AudioSource class) instead of
default .
pocketsphinx now gives some random output. Its nothing close to what we
speak.Also when we don't speak, some output is still shown.
Any clue on why this happens and how to overcome it??
Hi,
I have a similar problem. When I first ran recognizing I get no output. When I
start recognizing after that, the app crashes.
Nijkio002002, what did you make to fix your problem?
Here is my pocketsphinx .log
I get a SIGSEGV 11 error after the second recognition starts