pub struct WordTimestamp {
pub word: String,
pub start_ms: u64,
pub end_ms: u64,
pub confidence: f32,
pub word_confidence: f32,
}Expand description
A single word with its timing and ASR confidence score.
Fields§
§word: String§start_ms: u64§end_ms: u64§confidence: f32ASR confidence in [0.0, 1.0].
word_confidence: f32Per-word quality confidence in [0.0, 1.0]. This may differ from ASR confidence — it reflects display quality (e.g., low confidence words could be rendered with special styling).
Implementations§
Source§impl WordTimestamp
impl WordTimestamp
Sourcepub fn with_word_confidence(
word: String,
start_ms: u64,
end_ms: u64,
confidence: f32,
word_confidence: f32,
) -> Self
pub fn with_word_confidence( word: String, start_ms: u64, end_ms: u64, confidence: f32, word_confidence: f32, ) -> Self
Construct a WordTimestamp with a given word-level quality confidence score.
Sourcepub fn is_high_quality(&self, threshold: f32) -> bool
pub fn is_high_quality(&self, threshold: f32) -> bool
Returns true if the word-level confidence meets threshold.
Trait Implementations§
Source§impl Clone for WordTimestamp
impl Clone for WordTimestamp
Source§fn clone(&self) -> WordTimestamp
fn clone(&self) -> WordTimestamp
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 WordTimestamp
impl Debug for WordTimestamp
Source§impl PartialEq for WordTimestamp
impl PartialEq for WordTimestamp
impl StructuralPartialEq for WordTimestamp
Auto Trait Implementations§
impl Freeze for WordTimestamp
impl RefUnwindSafe for WordTimestamp
impl Send for WordTimestamp
impl Sync for WordTimestamp
impl Unpin for WordTimestamp
impl UnsafeUnpin for WordTimestamp
impl UnwindSafe for WordTimestamp
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