Cant start service? (Speech recog)

You have this: private void setupRecognizer(File assetDir) throws IOException { recognizer = defaultSetup() .setAcousticModel(new File(assetDir, “hmm/en-us-semi”)) .setDictionary(new File(assetDir, “lm/cmu07a.dic”)) .setKeywordThreshold(1e-5f) .getRecognizer(); recognizer.addListener(this); // recognizer.addKeywordSearch(“Hello”, assetDir); //I don’t know what this does… recognizer.startListening(“Hello”); //Start listeneing } Try changing it to this: private void setupRecognizer(File assetDir) throws IOException { recognizer = defaultSetup() .setAcousticModel(new File(assetDir, “hmm/en-us-semi”)) .setDictionary(new File(assetDir, … Read more

Recognizing multiple keywords using PocketSphinx

Thanks to Nikolay’s tip (see his answer above), I have developed the following code which works fine, and does not recognize words unless they’re on the list. You can copy and paste this directly over the main class in the PocketSphinxDemo code: public class PocketSphinxActivity extends Activity implements RecognitionListener { private static final String DIGITS_SEARCH … Read more