In my app i am using RecognizerIntent for Android Speech to Text (and Speech to Text functionality is working fine for me) with simple microphone Image button, which will initialize the Speech to Text (below is code snippet)
btnSpeak.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
sr.startListening(intent);
// btnSpeak.setClickable(false);
// promptSpeechInput();
}
});
But i just wanted to know how i can use Siri or Skyvi like Microphone button in my App so that it will help end user to determine the current state of Speech to Text engine (Whether it is listening or it stop listening) and i am not using any Prompt window to ask user "Speak Now".
Raise an intent of
ACTION_RECOGNIZE_SPEECH
type: