I installed the demo version of PocketSphinx and works fine under Ubuntu and Eclipse, but despite the attempts, I canβt figure out how to add recognition of several words.
All I want is code for recognizing individual words, which I can then switch() in the code, for example. "up down left right." I do not want to recognize sentences, only single words.
Any help on this would be greatly appreciated. I noticed that other users are facing similar problems, but so far no one knows the answer.
One thing that puzzles me is why should we even use the "wake up" constant?
private static final String KWS_SEARCH = "wakeup"; private static final String KEYPHRASE = "oh mighty computer"; . . . recognizer.addKeyphraseSearch(KWS_SEARCH, KEYPHRASE);
What has wakeup to do something?
I made some progress (?): Using addGrammarSearch , I can use the .gram file to list my words, for example. up,down,left,right,forwards,backwards , which seems to work well if all I say are those specific words. However, any other words will make the system correspond to what is said to the "closest" word from the declared ones. Ideally, I do not want recognition to occur if words spoken are not in the .gram file ...
android speech-recognition cmusphinx
Antinous Sep 09 '14 at 15:11 2014-09-09 15:11
source share