[][src]Struct tts::TTS

pub struct 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]

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]

Called when this speech synthesizer begins speaking an utterance.

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]

Called when this speech synthesizer is stopped and still has utterances in its queue.

Trait Implementations

impl Clone for TTS[src]

impl Drop for TTS[src]

impl Send for TTS[src]

impl Sync for TTS[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.