Created
May 12, 2020 16:26
-
-
Save StephenVinouze/4147c2d7ab3e3873f308033109123225 to your computer and use it in GitHub Desktop.
This file contains 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
override fun onPartialResults(partialResults: Bundle) { | |
val matches = partialResults.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION) | |
if (matches != null) { | |
// Handle partial matches | |
} | |
} | |
override fun onResults(results: Bundle) { | |
val matches = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION) | |
val scores = results.getFloatArray(SpeechRecognizer.CONFIDENCE_SCORES) | |
if (matches != null) { | |
// Handle matches | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment