-1

I want to create an android app that is waiting for speech of a specific keyword: when the user says this keyword, the service becomes ready to receive user voice commands. So I am searching for a continous speech recognizer,

Like this guy:

Can I keep the speech recognizer listening indefinitely?

Like this guy:

Continuous Speechrecognition in Android

And this guy:

Continuous Speech Recognition Android

But seriously, there is not a clear answer for all those! Is there someone who are able to manage this? Is there a source code for that?

Community
  • 1
  • 1
  • There is no need to ask duplicate questions here, you can just upvote other questions. Just another rant doesn't increase your chance to get a high quality anwer. – Nikolay Shmyrev Mar 15 '13 at 06:07

1 Answers1

-1

Create a service and put your recognizer code there, it will work. You need the following in your intent

mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
    mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                                    RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
    mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, 
                                    this.getPackageName());  

See http://developer.android.com/reference/android/speech/RecognizerIntent.html for more info.

Hoan Nguyen
  • 18,033
  • 3
  • 50
  • 54