#[non_exhaustive]pub struct Token {
pub id: u32,
pub piece: String,
pub start_ms: u32,
}Expand description
One token of a Transcript.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: u32Id in the model’s vocabulary.
piece: StringVocabulary piece: a SentencePiece piece (▁ marks a word start), a character, or for
Whisper and Moonshine’s byte tokens the text the token completes (its bytes may end inside a
character).
start_ms: u32Start time in milliseconds from the start of the audio: the encoder frame where the token was emitted times the frame length (40 ms for GigaAM, 80 ms for Parakeet); for Whisper the start of its segment; 0 for Moonshine, which has no timestamps.
Trait Implementations§
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more