[−][src]Struct tts::TTS
Implementations
impl TTS
[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]
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]
&mut self,
text: S,
interrupt: bool
) -> Result<Option<UtteranceId>, Error>
Speaks the specified text, optionally interrupting current speech.
pub fn stop(&mut self) -> Result<&Self, Error>
[src]
Stops current speech.
pub fn min_rate(&self) -> f32
[src]
Returns the minimum rate for this speech synthesizer.
pub fn max_rate(&self) -> f32
[src]
Returns the maximum rate for this speech synthesizer.
pub fn normal_rate(&self) -> f32
[src]
Returns the normal rate for this speech synthesizer.
pub fn get_rate(&self) -> Result<f32, Error>
[src]
Gets the current speech rate.
pub fn set_rate(&mut self, rate: f32) -> Result<&Self, Error>
[src]
Sets the desired speech rate.
pub fn min_pitch(&self) -> f32
[src]
Returns the minimum pitch for this speech synthesizer.
pub fn max_pitch(&self) -> f32
[src]
Returns the maximum pitch for this speech synthesizer.
pub fn normal_pitch(&self) -> f32
[src]
Returns the normal pitch for this speech synthesizer.
pub fn get_pitch(&self) -> Result<f32, Error>
[src]
Gets the current speech pitch.
pub fn set_pitch(&mut self, pitch: f32) -> Result<&Self, Error>
[src]
Sets the desired speech pitch.
pub fn min_volume(&self) -> f32
[src]
Returns the minimum volume for this speech synthesizer.
pub fn max_volume(&self) -> f32
[src]
Returns the maximum volume for this speech synthesizer.
pub fn normal_volume(&self) -> f32
[src]
Returns the normal volume for this speech synthesizer.
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]
Sets the desired speech volume.
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]
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
Called when this speech synthesizer begins speaking an utterance.
pub fn on_utterance_end(
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
[src]
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
Called when this speech synthesizer finishes speaking an utterance.
pub fn on_utterance_stop(
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
[src]
&self,
callback: Option<Box<dyn FnMut(UtteranceId)>>
) -> Result<(), Error>
Called when this speech synthesizer is stopped and still has utterances in its queue.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,