CMUSphinx recently implemented continuous listening on the Android platform. You can find the demo on the wiki page.
You can configure one or more keywords to listen to, the default keyword is "oh mighty computer". You can also set the detection threshold. Currently supported languages are the United States and some others (French, Spanish, Russian, etc.). You can prepare your own model for your language.
Listening is simple, you create a recognizer and just add a keyword search:
recognizer = defaultSetup() .setAcousticModel(new File(modelsDir, "hmm/en-us-semi")) .setDictionary(new File(modelsDir, "lm/cmu07a.dic")) .setKeywordThreshold(1e-5f) .getRecognizer(); recognizer.addListener(this); recognizer.addKeywordSearch(KWS_SEARCH_NAME, KEYPHRASE); switchSearch(KWS_SEARCH_NAME);
and identify the listener:
@Override public void onPartialResult(Hypothesis hypothesis) { String text = hypothesis.getHypstr(); if (text.equals(KEYPHRASE))
Nikolay Shmyrev
source share