Struct tts::Tts [−][src]
pub struct Tts(_);
Implementations
impl Tts
[src]
impl Tts
[src]pub fn new(backend: Backends) -> Result<Tts, Error>
[src]
pub fn new(backend: Backends) -> Result<Tts, Error>
[src]Create a new TTS
instance with the specified backend.
pub fn default() -> Result<Tts, Error>
[src]
pub fn supported_features(&self) -> Features
[src]
pub fn supported_features(&self) -> Features
[src]Returns the features supported by this TTS engine
pub fn speak<S: Into<String>>(
&mut self,
text: S,
interrupt: bool
) -> Result<Option<UtteranceId>, Error>
[src]
pub fn speak<S: Into<String>>(
&mut self,
text: S,
interrupt: bool
) -> Result<Option<UtteranceId>, Error>
[src]Speaks the specified text, optionally interrupting current speech.
pub fn normal_rate(&self) -> f32
[src]
pub fn normal_rate(&self) -> f32
[src]Returns the normal rate for this speech synthesizer.
pub fn normal_pitch(&self) -> f32
[src]
pub fn normal_pitch(&self) -> f32
[src]Returns the normal pitch for this speech synthesizer.
pub fn min_volume(&self) -> f32
[src]
pub fn min_volume(&self) -> f32
[src]Returns the minimum volume for this speech synthesizer.
pub fn max_volume(&self) -> f32
[src]
pub fn max_volume(&self) -> f32
[src]Returns the maximum volume for this speech synthesizer.
pub fn normal_volume(&self) -> f32
[src]
pub fn normal_volume(&self) -> f32
[src]Returns the normal volume for this speech synthesizer.
pub fn get_volume(&self) -> Result<f32, Error>
[src]
pub fn get_volume(&self) -> Result<f32, Error>
[src]Gets the current speech volume.
pub fn set_volume(&mut self, volume: f32) -> Result<&Self, Error>
[src]
pub fn set_volume(&mut self, volume: f32) -> Result<&Self, Error>
[src]Sets the desired speech volume.
pub fn is_speaking(&self) -> Result<bool, Error>
[src]
pub fn is_speaking(&self) -> Result<bool, Error>
[src]Returns whether this speech synthesizer is speaking.
pub fn on_utterance_begin(
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
[src]
pub fn on_utterance_begin(
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
[src]Called when this speech synthesizer begins speaking an utterance.
pub fn on_utterance_end(
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
[src]
pub fn on_utterance_end(
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
[src]Called when this speech synthesizer finishes speaking an utterance.
pub fn on_utterance_stop(
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
[src]
pub fn on_utterance_stop(
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
[src]Called when this speech synthesizer is stopped and still has utterances in its queue.
pub fn screen_reader_available() -> bool
[src]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more