cmusphinx

pocketsphinx - how to switch from keyword spotting to grammar mode

回眸只為那壹抹淺笑 提交于 2021-02-07 09:01:02
问题 I'm using pocketsphinx with raspberry pi for home automation. I've written a simple JSGF grammar file with the supported commands. Now, I want to use an activation phrase such as "hey computer" prior to the commands, to avoid false detections and only perform speech recognition once the activation phrase has been spoken. If I'm not getting this wrong, pocketsphinx supports two modes for speech recognition: keyword spotting mode, and language model / JSGF grammar mode. In pocketsphinx FAQ when

How to depend on this maven project

偶尔善良 提交于 2020-01-17 09:48:08
问题 My projects consists of three sub-projects, and my parent pom looks like: <groupId>com.bwort.core</groupId> <artifactId>bwort</artifactId> <packaging>pom</packaging> <version>0.0.1-SNAPSHOT</version> <name>bwort</name> <modules> <module>proj1</module> <module>proj2</module> <module>proj3</module> </modules> Now my project needs to dependent this project below, which comprises three subprojects, with a parent pom. In particular, it already has a parent as below: https://github.com/cmusphinx

Running different commands with different words in PocketSphinx

不问归期 提交于 2020-01-17 03:25:19
问题 I have found ways to make pocketsphinx activate using multiple keywords, but I want to run diffrent commands depending on which keyword was said. I have already made it connect to Amazon's Alexa server when "Alexa" is said and now I want to add a command when I say "TV Off" and "TV On." 回答1: The best thing is to use python, something like this: import sys, os from pocketsphinx.pocketsphinx import * from sphinxbase.sphinxbase import * import pyaudio modeldir = "../../../model" # Create a

Handling Errors in PocketSphinx Android app

限于喜欢 提交于 2020-01-14 04:16:27
问题 I am using the default dictionary that comes with the pocketsphinx demo which is good for my purposes. When a user enters a phrase, the app starts a keyphrase listening but if the word is not found in the dictionary the app crashes. The app crashes onError() within a service. How is the error handling done? is there any way I can catch the error? Overall I would just like the service to call stopSelf() when an error happens so the main activity won't crash as well. Errors: ERROR: "kws_search

Run Pocketsphinx and Google TTS together

对着背影说爱祢 提交于 2020-01-14 03:05:13
问题 I want to start a new activity that recognizes speech from the beginning and could read incoming message right after the activity started. This code is the code that merged from default. It runs well in default condition. But I want to remove the button as the trigger and use voice instead to trigger further action in SMSReaderMain.java . Therefore, I use pocketsphinx for Android to make it possible. pocketSphinxAndroidDemo-preAlpha project Android text to Speech Tutorial project It gives me

Why am I missing the an4-1-1.match file in this speech recognition code?

跟風遠走 提交于 2020-01-11 13:16:33
问题 I'm having problems in the decoding part of speech recognition. I followed the steps here. When I type: perl scripts_pl/decode/slave.pl , I get these errors: MODULE: DECODE Decoding using models previously trained Decoding 130 segments starting at 0 (part 1 of 1) Could not find executable for /home/go/Documents/tutorial/an4/bin/sphinx3_decode at /home/go/Documents/tutorial/an4/scripts_pl/decode/../lib/SphinxTrain/Util.pm line 299. Aligning results to find error rate Can't open /home/go

Keyword or keyphrase spotting with Sphinx4

夙愿已清 提交于 2020-01-11 03:41:07
问题 I am currently trying to make my java code (using eclipse) perform some function if a certain thing is said. I am using the Sphinx4 libraries and this is what I currently have: What I would like it to do is at the line where it says: IF (TRUE) someFunction(); is to run the function if my speech is Hello Computer, Hello Jarvis, Good Morning Computer, or Good Morning Jarvis. Or in other words, run the function if the speech matches the "public < greet >" line of code in the .gram file. Even

Sphinx 4 Failed to align audio to trancript

吃可爱长大的小学妹 提交于 2020-01-05 04:18:07
问题 I am following Acoustic Model Adaption using Sphinx 4 with the following wav files. Here is the result I get when using bw -hmmdir wsj -moddeffn wsj/mdef -ts2cbfn .cont. -feat 1s_c_d_dd -cmn current -agc none -dictfn vn.dic -ctlfn lisp.fileids -lsnfn lisp.transcription -accumdir . utt> 0 lisp_0001 53INFO: cmn.c(175): CMN: 73.43 2.89 -0.3 4 -1.85 -0.98 -0.52 0.33 0.67 -0.77 -0.56 0.18 -0.50 -0.30 0 28 1 ERROR: "backward.c", line 421: Failed to align audio to trancript: final state of the

pocketsphinx_continuous failed to open audio device

拥有回忆 提交于 2020-01-02 02:50:10
问题 After installing pocketsphinx , when I tried to run the pocketsphinx_continuous program then I got this error.. _oss.c(103): Failed to open audio device(/dev/dsp): No such file or directory FATAL_ERROR: "continuous.c", line 242: Failed top open audio device How to solve this problem? 回答1: Install the following from the terminal : sudo apt-get update;sudo apt-get dist-upgrade; sudo apt-get install pavucontrol linux-sound-base alsa-base alsa-utils lightdm ubuntu-desktop linux-image-`uname -r`