Last active
July 6, 2020 16:57
-
-
Save catalinghita8/10392096d68a35dd513cb1d12551629f 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 var speechRecognizer: SpeechRecognizer? = null | |
| ... | |
| private fun listenToSpeechInput() { | |
| speechRecognizer = SpeechRecognizer.createSpeechRecognizer(context) | |
| speechRecognizer?.setRecognitionListener(object: RecognitionListener { | |
| ... | |
| override fun onResults(p0: Bundle?) { | |
| speechRecognizer?.stopListening() | |
| requestExtractQuery(p0, true) | |
| } | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment