I would like to add voice command listener in my application.Service should listen to predefined keyword and and if keyword is spoken it should call some method.
Voice command recognition (activation command) should work without send request to Google voice servers.
How can I do it on Android?
Thanks for posting some useful resources.
You can use Pocketsphinx to accomplish this task. Check Pocketsphinx android demo for example how to listen for keyword efficiently in offline and react on the specific commands like a key phrase "oh mighty computer". The code to do that is simple:
you create a recognizer and just add keyword spotting search:
and define a listener:
You can adjust keyword threshold for the best detection/false alarm match. For the ideal detection accuracy keyword should have at least 3 syllables, better 4 syllables.