That popup is from the Google SpeechRecognizer UI, you can’t remove it directly.
You need to use the SpeechRecognizer API instead.
Example:
val recognizer = SpeechRecognizer.createSpeechRecognizer(context)
val intent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH).apply {
putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM)
putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault())
putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, context.packageName)
}
recognizer.setRecognitionListener(object : RecognitionListener {
override fun onResults(results: Bundle?) { /* handle results */ }
override fun onReadyForSpeech(params: Bundle?) { /* update UI */ }
// implement other callbacks...
})
recognizer.startListening(intent)