Interface RecognitionCallback
- All Known Implementing Classes:
RecognitionCallback.Adapter
public interface RecognitionCallback
Listener for
SpeechRecognizer results. Every method is invoked
on the EDT.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidonEnd()Recognition session ended (timeout, mic released, orSpeechRecognizer.stop()).voidRecognition failed (no permission, no network for online engines, hardware error).voidonPartialResult(String transcript) Best-effort transcript while the user is still speaking.voidFinal transcript for a single utterance.
-
Method Details
-
onPartialResult
Best-effort transcript while the user is still speaking. May fire many times beforeonResult(String, float, String[]). Skip overriding ifRecognitionOptions.setPartialResults(false)was passed. -
onResult
-
onEnd
void onEnd()Recognition session ended (timeout, mic released, orSpeechRecognizer.stop()). No more callbacks will fire. -
onError
Recognition failed (no permission, no network for online engines, hardware error).
-