Wake up android phone with certain words like Hi Galaxy or Ok Google
Asked Answered
L

2

9

I would like to wake up an android phone by saying for example "Hello George", but could not find any useful answers. First of all , is android app needs to listen as service in background for this feature or not? I would appreciate if anyone knows how to implement this issue or have any clue.

Best Regards Thank you

Lathery answered 29/9, 2013 at 17:30 Comment(1)
The 'wake up with voice command' is a feature of the Moto X which uses a special CPU to listen for the voice command when the device is in standby, to avoid large battery drain. To do this feature well you would need to be building your own device and custom ROM.Haberdashery
P
7

Hi I'm the developer of Open Mic+ http://OpenMic.RSenApps.com, which does something very similar to what you want. The truth is this is a lot more complicated than it sounds and I'm only beginning to implement systems that are actually efficient. So I guess the main thing is how far do you want to go? You can implement Google Speech Recognition, but in the end, it's terribly buggy and really doesn't work in the long run or you can implement your own speech recognition, which is what I'm in the process of doing...

Polyhymnia answered 29/9, 2013 at 17:49 Comment(0)
I
3

CMUSphinx has recently implemented continuous listening on Android platform. You can find the demo on the wiki page

You can configure one or multiple keywords to listen to, the default keyword is "oh mighty computer". You also can configure the detection threshold. Currently supported languages are US English and few others (French, Spanish, Russian, etc). You can train your own model for your language.

Listening is simple, you create a recognizer and just add keyword spotting 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 define a listener:

@Override
public void onPartialResult(Hypothesis hypothesis) {
    String text = hypothesis.getHypstr();
    if (text.equals(KEYPHRASE))
      //  do something
} 
Inwrought answered 8/5, 2014 at 19:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.