# Interface TimedRecognitionCallback

All Superinterfaces:
  `RecognitionCallback`

All Known Implementing Classes:
  `TimedRecognitionCallback.Adapter`

public interface TimedRecognitionCallback extends RecognitionCallback
Caption-aware `SpeechRecognizer` callback. Platform recognizers that expose segment timing can call these overloads; text-only recognizers continue to use `RecognitionCallback`.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static class`
  `TimedRecognitionCallback.Adapter`
  No-op adapter.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onPartialResult(TranscriptionResult result)`
  Called with an interim timed recognition result.
  `void`
  `onResult(TranscriptionResult result, float confidence, String[] alternatives)`
  Called with the final timed recognition result.

  ### Methods inherited from interface RecognitionCallback

  `onEnd, onError, onPartialResult, onResult`

- ## Method Details

  - ### onPartialResult

    void onPartialResult(TranscriptionResult result)
    Called with an interim timed recognition result.
    Parameters:
      `result` - partial timed recognition result

  - ### onResult

    void onResult(TranscriptionResult result, float confidence, String[] alternatives)
    Called with the final timed recognition result.
    Parameters:
      `result` - final timed recognition result
      `confidence` - confidence score from `0.0` to `1.0`, when available
      `alternatives` - provider-specific alternative transcripts