pub struct SpeechStream { /* private fields */ }Expand description
An utterance, readable while synthesis is still writing it.
Implementations§
Source§impl SpeechStream
impl SpeechStream
pub fn sample_rate(&self) -> u32
Sourcepub fn read(&mut self, out: &mut [f32]) -> Result<usize, SynthesisError>
pub fn read(&mut self, out: &mut [f32]) -> Result<usize, SynthesisError>
Copies buffered samples into out, waiting until some exist or the
utterance ends. Ok(0) is the end; a failed utterance reports its
cause once and SynthesisError::AlreadyFailed after.
Trait Implementations§
Source§impl Drop for SpeechStream
impl Drop for SpeechStream
Auto Trait Implementations§
impl Freeze for SpeechStream
impl RefUnwindSafe for SpeechStream
impl Send for SpeechStream
impl Sync for SpeechStream
impl Unpin for SpeechStream
impl UnsafeUnpin for SpeechStream
impl UnwindSafe for SpeechStream
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