TranscriptionResult

sealed interface TranscriptionResult

Represents the result of a transcription operation.

Results are emitted as a stream during real-time transcription:

  • Partial results are emitted as speech is being recognized (interim results)

  • Final results are emitted when a segment of speech is finalized

  • Error results indicate a problem during transcription

Inheritors

Types

Link copied to clipboard
data class Error(val message: String, val code: String? = null, val cause: Throwable? = null, val isRecoverable: Boolean = false) : TranscriptionResult

Error during transcription.

Link copied to clipboard
data class Final(val text: String, val confidence: Float = 0.0f, val words: List<TranscriptionResult.Word> = emptyList(), val startTime: Duration? = null, val endTime: Duration? = null) : TranscriptionResult

Final transcription result for a completed segment of speech. Once emitted, this segment will not change.

Link copied to clipboard
data class Partial(val text: String, val confidence: Float = 0.0f) : TranscriptionResult

Partial/interim transcription result. These are emitted during real-time transcription as the user speaks and may change as more audio is processed.

Link copied to clipboard
data class Word(val text: String, val confidence: Float = 0.0f, val startTime: Duration? = null, val endTime: Duration? = null)

Word-level transcription detail.