pocketsphinx

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 change this app to disable input from command line?

[亡魂溺海] 提交于 2019-12-11 07:29:18
问题 This is the Original code: #include <stdio.h> #include <string.h> #include <assert.h> #if defined(_WIN32) && !defined(__CYGWIN__) #include <windows.h> #else #include <sys/select.h> #endif #include <sphinxbase/err.h> #include <sphinxbase/ad.h> #include "pocketsphinx.h" static const arg_t cont_args_def[] = { POCKETSPHINX_OPTIONS, /* Argument file. */ {"-argfile", ARG_STRING, NULL, "Argument file giving extra arguments."}, {"-adcdev", ARG_STRING, NULL, "Name of audio device to use for input."},

Does pocketsphinx flush stdout?

此生再无相见时 提交于 2019-12-11 05:17:19
问题 I have been tinkering around with the CMUSphinx/Pocketsphinx and Node.js. What I'd like to do is spawn pocketsphinx_continuous in the background and then use node as a traffic control layer on top. However, pocketsphinx seems to ignore stdout completely. Does anyone know if that is by design? If I run it via CLI I will see out put like: READY.... Listening... INFO: ngram_search.c(467): Resized score stack to 200000 entries INFO: ngram_search.c(459): Resized backpointer table to 10000 entries

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,

Error when running pocketsphinx_continuous: Acoustic model definition is not specified

好久不见. 提交于 2019-12-10 21:22:40
问题 When I run pocketsphinx_continuous -inmic yes , I get this error: ERROR: "acmod.c", line 85: Acoustic model definition is not specified neither with -mdef option nor with -hmm . I've already read the information in this StackOverflow question as well as the Pocketsphinx FAQ, and neither of those helped. Here's the full stack trace: INFO: cmd_ln.c(691): Parsing command line: pocketsphinx_continuous \ -inmic yes Current configuration: [NAME] [DEFLT] [VALUE] -adcdev -agc none none -agcthresh 2.0

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

How to capture audio in Raspberry Pi using Pyaudio python module without overflow?

丶灬走出姿态 提交于 2019-12-08 04:20:05
问题 The following code I tried to run it on Raspberry Pi 3 Model B which has a little big of capacity on it's memory, the problem that I'm facing with the code is that it runs sometimes: from os import environ, path import pyaudio from pocketsphinx.pocketsphinx import * from sphinxbase.sphinxbase import * MODELDIR = "../../../model" DATADIR = "../../../test/data" config = Decoder.default_config() config.set_string('-hmm', path.join(MODELDIR, 'en-us/en-us')) config.set_string('-lm', path.join

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

How can we convert .wav file to text by using pocketsphinx?

此生再无相见时 提交于 2019-12-06 07:49:45
问题 I installed pocketsphinx in my Linux machine correctly, and now I want to convert an audio file (.wave) to text by using pocketsphinx,how can i do that? is there any clear command and short command to do that? somthing like this command: ./src/programs/pocketsphinx_continuous -samprate 8000 -nfft 2048 -adcdev hw:1,0 -lm 2530.lm -dict 2530.dic myvoice.wav and also how can I do that with using python? Thanks in advance. 回答1: I find my answer, pocketsphinx with version 0.8 has an option that can

Installing pocketsphinx python module: command 'swig.exe' failed

匆匆过客 提交于 2019-12-05 04:41:58
I'm getting something like this. Can anyone please tell me how to fix this. C:\Users\krush\Documents\ML using Python>pip install pocketsphinx Collecting pocketsphinx Using cached pocketsphinx-0.1.3.zip Building wheels for collected packages: pocketsphinx Running setup.py bdist_wheel for pocketsphinx: started Running setup.py bdist_wheel for pocketsphinx: finished with status 'error' Complete output from command C:\Users\krush\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\krush\\AppData\\Local\\Temp\\pip-build-cns2i_wb\\pocketsphinx\\setup.py';f=getattr(tokenize,