sapi_lite/tts/mod.rs
1//! Text-to-speech API.
2//!
3//! ## Synthesizer
4//!
5//! The entry point for speech synthesis is the synthesizer. This module provides two variants of
6//! synthesizers:
7//! * [`SyncSynthesizer`] will block the current thread until the speech synthesis is finished, or
8//! until the given timeout.
9//! * [`EventfulSynthesizer`] will return immediately and call the supplied event handler when the
10//! speech is finished.
11//!
12//! For asynchronous synthesis, see the [`tokio`](crate::tokio) module.
13//!
14//! All synthesizers share the methods defined in the [`Synthesizer`] struct.
15//!
16//! ## Voice
17//!
18//! The user can install a variety of voices on their machine. The [`installed_voices`] function
19//! allows iterating through all the installed voices, filtered by the provided criteria.
20
21mod speech;
22mod synthesizer;
23mod voice;
24
25pub use self::speech::{Pitch, Rate, SayAs, Speech, SpeechBuilder, Volume};
26pub use self::synthesizer::{
27 EventHandler, EventfulSynthesizer, SpeechOutput, SyncSynthesizer, Synthesizer,
28};
29pub use self::voice::{installed_voices, Voice, VoiceAge, VoiceGender, VoiceSelector};