Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Listening for keywords at all times, like "Ok google" on 4.4 [closed]

I've checked the new Kitkat libraries to make sure that I'm not missing something. I want my application to always listen to a keyword before performing an action, just like how Google Now always listens for the keywords "Ok google" on the homescreen.

How did Google accomplish this?

like image 442
Matt Smith Avatar asked Dec 01 '13 13:12

Matt Smith


2 Answers

What you need is called keyword spotting. Apart from online speech API Android has offline recognizer which is a bit more sophisticated. It is not mentioned in official documentation, but you can see the sources here, for example. I'm not sure you will find keyword spotting there, but at least you will have access to low-level recognizer interfaces.

UPD: Keyword spotting and voice activity detection are now implemented in pocketsphinx and pocketsphinx-android. See the official demo to see them both in action.

like image 157
Alexander Solovets Avatar answered Oct 26 '22 23:10

Alexander Solovets


Services can be kept running in the background! They probably invoked it by setting a broadcast receiver to receive the boot completed broadcast and invoking a service which is set to listen for the phrase.

like image 20
Niraj Adhikari Avatar answered Oct 27 '22 00:10

Niraj Adhikari