Last active
July 6, 2020 17:01
-
-
Save catalinghita8/90297552b770e10a0a93f4b7e61329e1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun promptSpeechInput() { | |
val intent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH) | |
intent.putExtra( | |
RecognizerIntent.EXTRA_LANGUAGE_MODEL, | |
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM | |
) | |
intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, activity?.application?.packageName?: "") | |
speechRecognizer?.startListening(intent) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment