SpeechRecognizer
Methods
fun recognize(onResult: Function1, onError: Function1): Unit
Runs speech recognition and handles the results via callback functions.
Parameters
onResult
(String) -> Unit
Callback function to get the recognized text as a String. Called when speech recognition is successful.
onError
(Exception) -> Unit
Callback function to get an Exception when a recognition error occurs. Called to process various errors during the recognition process.
Returns