pub struct CandidateTranscript(/* private fields */);
Expand description
A single transcript computed by the model, including a confidence value and the metadata for its constituent tokens.
Implementations§
Source§impl CandidateTranscript
impl CandidateTranscript
Sourcepub fn tokens(&self) -> &[TokenMetadata]
pub fn tokens(&self) -> &[TokenMetadata]
Return an array of tokens in this transcript.
Sourcepub const fn confidence(&self) -> f64
pub const fn confidence(&self) -> f64
Approximated confidence value for this transcript. This is roughly the sum of the acoustic model logit values for each timestep/character that contributed to the creation of this transcript.
Sourcepub const fn num_tokens(&self) -> u32
pub const fn num_tokens(&self) -> u32
Total number of tokens in this transcript.
Sourcepub fn to_owned(&self) -> OwnedCandidateTranscript
pub fn to_owned(&self) -> OwnedCandidateTranscript
Convert this into an OwnedCandidateTranscript
struct.
Warning: this can be very expensive depending on the total number of tokens in this object.
Trait Implementations§
impl Send for CandidateTranscript
impl Sync for CandidateTranscript
Auto Trait Implementations§
impl Freeze for CandidateTranscript
impl RefUnwindSafe for CandidateTranscript
impl Unpin for CandidateTranscript
impl UnwindSafe for CandidateTranscript
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