Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyword activated speech recognition on android

Is it possible to use this cool voice activation feature of "google now" in you own application?

So what I want is that the user does not have to trigger the activation by pressing a button or sth. like that.

I'd rather like to have an automatic speech recognition activated by a keyword. For example: When "google now" is opened you only have to say: "google". After that command the system is listening for the actual input.

Is this possible by using the android API? Or is there any open source library that provides this behavior?

I know that this is possible with "open ears" but unfortunately open ears is not available for android.

like image 790
Subby Avatar asked May 16 '13 19:05

Subby


People also ask

How do I turn off voice activation on Android?

On the side of your device, find both volume keys. Press and hold both volume keys for 3 seconds. To confirm that you want to turn TalkBack on or off, press both volume keys for 3 seconds again.


2 Answers

You have to run the speech recognition as a service instead of as an activity.

Check out this git for sample code on how to do this: https://github.com/gast-lib/gast-lib‎

like image 54
mnutsch Avatar answered Nov 15 '22 00:11

mnutsch


I would suggest using CMU Sphinx, or just restarting your recognizer on every "onResults" and "onError" function call.

like image 29
Aphire Avatar answered Nov 15 '22 01:11

Aphire