Customize the Speech Recognition Dialog
As an option you can launch speech recognizer with ACTION_RECOGNIZE_SPEECH
(without UI) and show whatever dialog you need
SpeechRecognizer speechRecognizer = SpeechRecognizer.createSpeechRecognizer(this);
speechRecognizer.setRecognitionListener(this);
Intent speechIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
speechIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
speechIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, this.getPackageName());
speechRecognizer.startListening(speechIntent);
Here you need to implement RecognitionListener
so you can show the dialog in public void onReadyForSpeech(Bundle params)
callback. Dismiss in public void onResults(Bundle results)
or public void onError(int error)