# Class RecognitionCallback.Adapter

java.lang.Object
com.codename1.media.RecognitionCallback.Adapter

All Implemented Interfaces:
  `RecognitionCallback`

Direct Known Subclasses:
  `TimedRecognitionCallback.Adapter`

Enclosing interface:
  `RecognitionCallback`

public static class RecognitionCallback.Adapter extends Object implements 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
  Constructor
  Description
  `Adapter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onEnd()`
  Recognition session ended (timeout, mic released, or `SpeechRecognizer.stop()`).
  `void`
  `onError(Throwable t)`
  Recognition failed (no permission, no network for online engines, hardware error).
  `void`
  `onPartialResult(String transcript)`
  Best-effort transcript while the user is still speaking.
  `void`
  `onResult(String transcript, float confidence, String[] alternatives)`
  Final transcript for a single utterance.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Adapter

    public Adapter()

- ## Method Details

  - ### onPartialResult

    public void onPartialResult(String transcript)
    Description copied from interface: `RecognitionCallback`
    Best-effort transcript while the user is still speaking. May fire many times before `RecognitionCallback.onResult(String, float, String[])`. Skip overriding if `RecognitionOptions.setPartialResults(false)` was passed.
    Specified by:
      `onPartialResult` in interface `RecognitionCallback`

  - ### onResult

    public void onResult(String transcript, float confidence, String[] alternatives)
    Description copied from interface: `RecognitionCallback`
    Final transcript for a single utterance. `confidence` is in `[0.0, 1.0]` when the platform supplies one, or `-1` when it doesn't. `alternatives` may be empty.
    Specified by:
      `onResult` in interface `RecognitionCallback`

  - ### onEnd

    public void onEnd()
    Description copied from interface: `RecognitionCallback`
    Recognition session ended (timeout, mic released, or `SpeechRecognizer.stop()`). No more callbacks will fire.
    Specified by:
      `onEnd` in interface `RecognitionCallback`

  - ### onError

    public void onError(Throwable t)
    Description copied from interface: `RecognitionCallback`
    Recognition failed (no permission, no network for online engines, hardware error).
    Specified by:
      `onError` in interface `RecognitionCallback`