pub struct TTS(_);
Implementations§
source§impl TTS
impl TTS
sourcepub fn new(backend: Backends) -> Result<TTS, Error>
pub fn new(backend: Backends) -> Result<TTS, Error>
Create a new TTS
instance with the specified backend.
pub fn default() -> Result<TTS, Error>
sourcepub fn speak<S: Into<String>>(
&self,
text: S,
interrupt: bool
) -> Result<&Self, Error>
pub fn speak<S: Into<String>>(
&self,
text: S,
interrupt: bool
) -> Result<&Self, Error>
Speaks the specified text, optionally interrupting current speech.
sourcepub fn get_volume(&self) -> Result<u8, Error>
pub fn get_volume(&self) -> Result<u8, Error>
Gets the current speech volume.