Thanks for your quick reply Nickolay.
What is the sound format of the RAW file when recording the sound using an Android tablet with pocketsphinx? Is it possible to write Android Code to re-play it using Android Media directly or turn it into listenable sound format?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does the attached raw find sound correct to you? It is too fast for me. What should I do to slow it down? One of my program requirement is speech recognition & record audio at the same time.
Thanks
I have 2 questions:
1 Is there any way that I can use both phonemes lm and static lm at the same time on android?
2 Using pocketsphinx on android, can I play a raw audio fie to have the hypothesis instead of using the micro phone?
My objective is to cooperate different models in order to evaluate a speech.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I follow the link above and when I run the program, it fails at the line
Config c= Decoder.defaultConfig();
Config c = Decoder.defaultConfig();
c.setString("-hmm", new File(assetsDir, "en-us-ptm").getCanonicalPath()); c.setString("-lm", new File(assetsDir, "4767.lm").getCanonicalPath());
c.setString("-dict", new File(assetsDir, "4767.dic").getCanonicalPath());
Decoder d = new Decoder(c);
Error Message:
E/art: No implementation found for long edu.cmu.pocketsphinx.PocketSphinxJNI.Decoder_defaultConfig() (tried Java_edu_cmu_pocketsphinx_PocketSphinxJNI_Decoder_1defaultConfig and Java_edu_cmu_pocketsphinx_PocketSphinxJNI_Decoder_1defaultConfig__)
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: edu.cmu.sphinx.pocketsphinx, PID: 4598
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.UnsatisfiedLinkError: No implementation found for long edu.cmu.pocketsphinx.PocketSphinxJNI.Decoder_defaultConfig() (tried Java_edu_cmu_pocketsphinx_PocketSphinxJNI_Decoder_1defaultConfig and Java_edu_cmu_pocketsphinx_PocketSphinxJNI_Decoder_1defaultConfig__)
at edu.cmu.pocketsphinx.PocketSphinxJNI.Decoder_defaultConfig(Native Method)
at edu.cmu.pocketsphinx.Decoder.defaultConfig(Decoder.java:77)
at edu.cmu.pocketsphinx.demo.PocketSphinxActivity.setupRecognizerWithWav(PocketSphinxActivity.java:754)
at edu.cmu.pocketsphinx.demo.PocketSphinxActivity.access$100(PocketSphinxActivity.java:91)
at edu.cmu.pocketsphinx.demo.PocketSphinxActivity$1.doInBackground(PocketSphinxActivity.java:632)
at edu.cmu.pocketsphinx.demo.PocketSphinxActivity$1.doInBackground(PocketSphinxActivity.java:625)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
What did I do wrong? Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Nickolay,
My co-worker on iOS is struggling in assess a recorded files. He uses pocketsphinx directly a not OpenEar and has achieved the realtime speech recognition. Do you have equivalent code bellow in Objective-C?
Thanks.
I cannot listen to the file 000000000.raw on Android Media Player and what music player you are use to listen to .raw?
You have to download audio to desktop and you can use audacity.
Thanks for your quick reply Nickolay.
What is the sound format of the RAW file when recording the sound using an Android tablet with pocketsphinx? Is it possible to write Android Code to re-play it using Android Media directly or turn it into listenable sound format?
http://stackoverflow.com/questions/11267687/pcm-raw-bytes-to-audio-on-android
awesome, thanks
Does the attached raw find sound correct to you? It is too fast for me. What should I do to slow it down? One of my program requirement is speech recognition & record audio at the same time.
Thanks
Yes
Set proper sample rate
great, it is perfect, thanks
I have 2 questions:
1 Is there any way that I can use both phonemes lm and static lm at the same time on android?
2 Using pocketsphinx on android, can I play a raw audio fie to have the hypothesis instead of using the micro phone?
My objective is to cooperate different models in order to evaluate a speech.
Thanks.
No
http://stackoverflow.com/questions/29008111/give-a-file-as-input-to-pocketsphinx-on-android
I will try it . Thanks a lot.
I follow the link above and when I run the program, it fails at the line
Config c= Decoder.defaultConfig();
Error Message:
What did I do wrong? Thanks
You didn't load the jni library:
It works great!!! Thanks!!!
Hi Nickolay,
Is there a way to include <SIL> +SPN+... in hypothesis using Language model?
Thanks
Last edit: JohnyProgrammer 2017-03-09
You can interate over segments and collect words, they should include fillers.
My bad , It works great!!! Many thanks
Last edit: JohnyProgrammer 2017-03-10
Hi Nickolay,
following https://github.com/cmusphinx/pocketsphinx-android
I got
What am I missing? Thanks
Last edit: JohnyProgrammer 2017-03-10
You have some problem with swig it seems, make sure that swig is installed and try to run the gradle swig command manually.
Thanks, It is working on gradle swig command manually.
Can I confim that each frame is 10ms? Thanks.
This is correct.
Hi Nickolay,
My co-worker on iOS is struggling in assess a recorded files. He uses pocketsphinx directly a not OpenEar and has achieved the realtime speech recognition. Do you have equivalent code bellow in Objective-C?
Thanks.