Class RecognitionCallback.Adapter
java.lang.Object
com.codename1.media.RecognitionCallback.Adapter
- All Implemented Interfaces:
RecognitionCallback
- Enclosing interface:
RecognitionCallback
No-op adapter. Subclass and override only what you need.
-
Nested Class Summary
Nested classes/interfaces inherited from interface RecognitionCallback
RecognitionCallback.Adapter -
Constructor Summary
Constructors -
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.
-
Constructor Details
-
Adapter
public Adapter()
-
-
Method Details
-
onPartialResult
Description copied from interface:RecognitionCallbackBest-effort transcript while the user is still speaking. May fire many times beforeRecognitionCallback.onResult(String, float, String[]). Skip overriding ifRecognitionOptions.setPartialResults(false)was passed.- Specified by:
onPartialResultin interfaceRecognitionCallback
-
onResult
Description copied from interface:RecognitionCallbackFinal transcript for a single utterance.confidenceis in[0.0, 1.0]when the platform supplies one, or-1when it doesn't.alternativesmay be empty.- Specified by:
onResultin interfaceRecognitionCallback
-
onEnd
public void onEnd()Description copied from interface:RecognitionCallbackRecognition session ended (timeout, mic released, orSpeechRecognizer.stop()). No more callbacks will fire.- Specified by:
onEndin interfaceRecognitionCallback
-
onError
Description copied from interface:RecognitionCallbackRecognition failed (no permission, no network for online engines, hardware error).- Specified by:
onErrorin interfaceRecognitionCallback
-