Expand description
Text-to-speech API.
Synthesizer
The entry point for speech synthesis is the synthesizer. This module provides two variants of synthesizers:
SyncSynthesizer
will block the current thread until the speech synthesis is finished, or until the given timeout.EventfulSynthesizer
will return immediately and call the supplied event handler when the speech is finished.
For asynchronous synthesis, see the tokio
module.
All synthesizers share the methods defined in the Synthesizer
struct.
Voice
The user can install a variety of voices on their machine. The installed_voices
function
allows iterating through all the installed voices, filtered by the provided criteria.
Structs
A speech synthesizer that calls the supplied event handler every time it finishes rendering speech.
Voice pitch, represented as a value in the interval [-10, 10], with 0 being normal pitch.
Speech rate, represented as a value in the interval [-10, 10], with 0 being normal speed.
Helper type that can construct a Speech
from a sequence of rendering instructions.
A speech synthesizer that blocks the current thread while rendering speech.
Provides the common speech synthesis API shared across different kinds of synthesizers.
A voice installed on the system.
Encapsulates the criteria for selecting a voice.
Voice volume, represented as a value in the interval [0, 100], with 100 being full volume.
Enums
Provides a hint about how to pronounce the associated content.
A speech to be rendered by a synthesizer.
Specifies where the output of speech synthesis should go.
Specifies the age of a voice.
Specifies the gender of a voice.
Traits
The handler EventfulSynthesizer
will call.
Functions
If successful, returns an iterator enumerating all the installed voices that satisfy the given criteria.