pub struct EstimatePlan { /* private fields */ }Expand description
Pre-resolved estimated boundaries for an utterance, in firing order.
Implementations§
Source§impl EstimatePlan
impl EstimatePlan
Sourcepub fn build(text: &str) -> Self
pub fn build(text: &str) -> Self
Build from the crate’s 150-wpm estimator, resolving char offsets in the spoken text. SSML input is stripped first so offsets and word lists match what is actually spoken.
Sourcepub fn from_estimates(estimated: &[WordBoundary], plain: &str) -> Self
pub fn from_estimates(estimated: &[WordBoundary], plain: &str) -> Self
Build from pre-computed boundaries against plain text (used by
engines that already have the plain text and estimates in hand).
Sourcepub fn event(&self, idx: usize) -> Option<&EstimateEvent>
pub fn event(&self, idx: usize) -> Option<&EstimateEvent>
The event at idx (firing order).
Auto Trait Implementations§
impl Freeze for EstimatePlan
impl RefUnwindSafe for EstimatePlan
impl Send for EstimatePlan
impl Sync for EstimatePlan
impl Unpin for EstimatePlan
impl UnsafeUnpin for EstimatePlan
impl UnwindSafe for EstimatePlan
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