TranscriptToken

data class TranscriptToken(val text: String, val confidence: Float? = null)

A word heard by a speech recognizer, with the recognizer's confidence in it when known.

This is the input side of TranscriptAlignment. Build it from any recognizer's output; RecognizedWord converts to it with RecognizedWord.transcriptToken.

Constructors

Link copied to clipboard
constructor(text: String, confidence: Float? = null)

Properties

Link copied to clipboard

The recognizer's confidence from 0 to 1, or null when unknown.

Link copied to clipboard

The word as the recognizer wrote it. A token holding several words is split during alignment, and every piece keeps this token's confidence.