struct

Whisper::Token

Inherits Struct < Value < Object

Per-token data from a transcription segment.

Each token represents a single unit produced by the Whisper decoder, carrying its text, numeric ID, probability, and optional timestamps.

Constructors

new(text : String, id : Int32, probability : Float32, start_ms : Int64 = 0_i64, end_ms : Int64 = 0_i64)
Source

Instance methods

end_ms

Token end time in milliseconds (only meaningful when token timestamps are enabled).

Source
id

The numeric token ID in the model vocabulary.

Source
probability

Probability of this token (0.0 to 1.0).

Source
start_ms

Token start time in milliseconds (only meaningful when token timestamps are enabled).

Source
text

The text content of this token.

Source