pub struct Transcription {
pub text: String,
pub segments: Vec<Segment>,
pub language: Option<String>,
pub processing_time_ms: u64,
pub cross_attention_weights: Option<CrossAttentionWeights>,
}Expand description
Complete transcription result
Fields§
§text: StringFull transcription text
segments: Vec<Segment>Timed segments
language: Option<String>Detected or specified language
processing_time_ms: u64Processing duration in milliseconds
cross_attention_weights: Option<CrossAttentionWeights>Cross-attention weights for alignment (G5)
Shape: [decoder_layers, decoder_tokens, encoder_frames]
Implementations§
Source§impl Transcription
impl Transcription
Sourcepub fn new() -> Transcription
pub fn new() -> Transcription
Create empty transcription
Sourcepub fn from_segments(segments: Vec<Segment>) -> Transcription
pub fn from_segments(segments: Vec<Segment>) -> Transcription
Create from segments
Sourcepub fn duration_ms(&self) -> u64
pub fn duration_ms(&self) -> u64
Total duration in milliseconds
Sourcepub fn word_count(&self) -> usize
pub fn word_count(&self) -> usize
Word count
Trait Implementations§
Source§impl Clone for Transcription
impl Clone for Transcription
Source§fn clone(&self) -> Transcription
fn clone(&self) -> Transcription
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Transcription
impl Debug for Transcription
Source§impl Default for Transcription
impl Default for Transcription
Source§fn default() -> Transcription
fn default() -> Transcription
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Transcription
impl RefUnwindSafe for Transcription
impl Send for Transcription
impl Sync for Transcription
impl Unpin for Transcription
impl UnsafeUnpin for Transcription
impl UnwindSafe for Transcription
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more