pocketsphinx-android

Google recognizer and pocketsphinx in two different classes, how to loop them?

你。 提交于 2019-12-12 01:42:20
问题 Yesterday i ask a simplified question of my problem, but think its too simplified. What my programm should do, is to hear a keyword and when he hear it, he should listen to what i said. (like if you told to siri or google now, by saying siri or ok google). I'm using pocketsphinx for the keyword and the google speechrecognizer for the longer parts. It works, but only for one time. The pocketsphinx is in the MainActivity and the google recognizer is in an extra class (Jarvis). The programm

PocketSphinx - How to understand when getHypstr() returns empty yet getInSpeech() returns True?

萝らか妹 提交于 2019-12-11 17:09:07
问题 Trying edu.cmu.sphinx.pocketsphinx with processRaw to detect silence. Using the following config: en-us.lm.bin language model en-us-ptm acoustic model cmudict-en-us.dict dictionary also setting remove_noise to True and samprate to 8000 I want to do a Ngram Search. When the While loop calling processRaw finishes I call both hypothesis.getHypstr() and decoder.getInSpeech() Why does getHypstr returns empty but getInSpeech returns True while actually there is no speech in the input argument given

hypothesis parameter pocketsphinx

泄露秘密 提交于 2019-12-11 09:48:46
问题 I use Pocketsphinx in my Android app. I recognize speech using addGrammarSearch (String name, File file). When there is noise around, then Pocketsphinx catches it and recognizes it as a word or phrase from the grammar. But the word was not uttered. Is there any parameter in the hypothesis, which shows how much the recognized sound is like a word from a grammar? What method can I get this parameter? I want to filter out the recognized sound, which has a low value, that is, it does not look

Pocketsphinx Android demo error: “Failed to init recognizer java.io.IOException: Failed to initialize recorder. Microphone might already be in use.”

我怕爱的太早我们不能终老 提交于 2019-12-11 08:15:31
问题 I have been using Pocketsphinx Android demo and get the error: "Failed to init recognizer java.io.IOException: Failed to initialize recorder. Microphone might already be in use." What does the error mean and what can I do to fix it ? 回答1: If you upgrade your Android OS to 6 or it is already 6, you have to ask permission in runtime. Android manifest recorder permission is not enough after Android OS 6. It will give this error if you do not ask permission. 来源: https://stackoverflow.com

How to setup tresholds to spot keywords from a list in pocketsphinx-android?

夙愿已清 提交于 2019-12-11 04:57:06
问题 I would like my Android application to do continuous keywords spotting. I'm modifying the pocketsphinx android demo to test how I can do it. I wrote this list in a file named en-keywords.txt picking words from cmudict-en-us.dict : rainbow /1e-50/ about /1e-50/ blood /1e-50/ energies /1e-50/ In setupRecognizer method I removed every search and added to the recognizer only this keyword search: File keywords= new File(assetsDir, "en-keywords.txt"); recognizer.addKeywordSearch(KWS_SEARCH,

Setting up PocketSphinx library in my own Android App

久未见 提交于 2019-12-10 11:16:52
问题 I am trying to implement Speech Recognition with the help of Pocket Sphinx Library . What my approach was, I just downloaded their demo project for Android. Imported it in Eclipse, did clean-build and run it on device. It ran successfully. After this I copied the libs folder from demo project to my own project. I copied the assets folder contents as it is in my own project. Then I edited the digits.gram file contents as per this post. Then implemented the Listener in my activity and added

Keyword is not detected using pocketsphinx on android

蹲街弑〆低调 提交于 2019-12-10 10:16:13
问题 Can anybody explain me how I can convert my speech to text using pocketsphinx? I try this: import com.example.speechtutor.SpeechRecognizerRecorder; import com.example.speechtutor.SpeechRecognizerRecorderSetup; import edu.cmu.pocketsphinx.Hypothesis; import edu.cmu.pocketsphinx.RecognitionListener; import static edu.cmu.pocketsphinx.Assets.syncAssets; public class SpeakActivity extends Activity implements RecognitionListener { SpeechRecognizerRecorder recognizer; private File appDir; String

Setting up PocketSphinx library in my own Android App

折月煮酒 提交于 2019-12-06 10:52:17
I am trying to implement Speech Recognition with the help of Pocket Sphinx Library . What my approach was, I just downloaded their demo project for Android. Imported it in Eclipse, did clean-build and run it on device. It ran successfully. After this I copied the libs folder from demo project to my own project. I copied the assets folder contents as it is in my own project. Then I edited the digits.gram file contents as per this post . Then implemented the Listener in my activity and added addKeywordSearch to it. My Questions: Is this approach correct to implement this library in our own

Calling Pocketsphinx in C# AccesViolationException

拈花ヽ惹草 提交于 2019-12-05 21:51:34
I'm trying to do the pocketsphinx tutorial in C# using pinvoke but get an AccessViolationException when I try to decode using ps_decode_raw(). IntPtr ps = PocketSphinx.ps_init(config); IntPtr fh = Win32Util.fopen(@"goforward.raw", "rb"); int rv = PocketSphinx.ps_decode_raw(ps, fh, "goforward", -1); The functions are wrapped as follows //ps_decoder_t* ps_init(cmd_ln_t* config) [DllImport("pocketsphinx.dll", SetLastError = true, CallingConvention = CallingConvention.Cdecl)] public extern static IntPtr ps_init( IntPtr config); //int ps_decode_raw(ps_decoder_t *ps, FILE *rawfh, char const *uttid,

Integration of Pocketsphinx Android with Phonegap app

随声附和 提交于 2019-12-05 19:36:21
I'm trying to integrate the Sphinx with my Phonegap app, and following the pocketsphinx-android-demo, but getting the RuntimeException when startup, here is the details: E/OADemo (15835): java.lang.RuntimeException: Decoder_setSearch returned -1 E/OADemo (15835): at edu.cmu.pocketsphinx.PocketSphinxJNI.Decoder_setSearch(Native Method) E/OADemo (15835): at edu.cmu.pocketsphinx.Decoder.setSearch(Unknown Source) E/OADemo (15835): at edu.cmu.pocketsphinx.SpeechRecognizer.startListening(Unknown Source) E/OADemo (15835): at cn.fsll.oademo.OADemo.switchSearch(OADemo.java:103) E/OADemo (15835): at cn