TranscriptionUpdate
classin packageklyn.genai.stt
public class TranscriptionUpdate
TranscriptionUpdate

One immutable streaming hypothesis. A partial update replaces the preceding hypothesis for the same segmentId; only isFinal commits that segment. Bounds are audio seconds since stream creation, including captured silence.

Example

if update.isFinal: print(update.text)

Properties
Modifier and Type Member Description
public readonly property end
end as Double
Audio interval end.
public readonly property isFinal
isFinal as Boolean
False for revisable text, true for a completed utterance.
public readonly property language
language as String
Detected/selected language code.
public readonly property segmentId
segmentId as Long
Stable utterance identifier.
public readonly property start
start as Double
Audio interval start.
public readonly property text
text as String
Current hypothesis.
Constructors
Modifier and Type Member Description
public TranscriptionUpdate
TranscriptionUpdate(segmentId as Long, notnull text as String, isFinal as Boolean, notnull language as String, start as Double, end as Double)
Captures one hypothesis; negative IDs/invalid bounds are rejected.