pub struct EventfulSynthesizer { /* private fields */ }Expand description
A speech synthesizer that calls the supplied event handler every time it finishes rendering speech.
Implementations§
Source§impl EventfulSynthesizer
impl EventfulSynthesizer
Sourcepub fn new<E: EventHandler + 'static>(handler: E) -> Result<Self>
pub fn new<E: EventHandler + 'static>(handler: E) -> Result<Self>
Creates a new synthesizer that will output to the default audio device and call the supplied event handler.
Methods from Deref<Target = Synthesizer>§
Sourcepub fn set_output(
&self,
output: SpeechOutput,
allow_fmt_changes: bool,
) -> Result<()>
pub fn set_output( &self, output: SpeechOutput, allow_fmt_changes: bool, ) -> Result<()>
Configures the synthesizer to render its speech to the given output destination.
Sourcepub fn voice(&self) -> Result<Voice>
pub fn voice(&self) -> Result<Voice>
Returns the default voice this synthesizer will use to render speech.
Sourcepub fn set_rate<R: Into<Rate>>(&self, rate: R) -> Result<()>
pub fn set_rate<R: Into<Rate>>(&self, rate: R) -> Result<()>
Sets the default rate of speech for this synthesizer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventfulSynthesizer
impl RefUnwindSafe for EventfulSynthesizer
impl Send for EventfulSynthesizer
impl Sync for EventfulSynthesizer
impl Unpin for EventfulSynthesizer
impl UnwindSafe for EventfulSynthesizer
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