Skip to main content

Module synthesis

Module synthesis 

Source
Expand description

The text-to-speech contract engine crates implement.

Re-exports§

pub use chunk::chunks;

Modules§

chunk
Splitting speech text into sentence-sized chunks.
prelude
One import for code that speaks through an engine. Chunking, the raw stream pair, and model validation stay outside it. Synthesis and Session exist only off wasm.

Structs§

SessionNon-target_family=wasm
One PCM-producing utterance.
SpeakerOutputplayback and non-target_family=wasm
Checks for an output device at construction and resolves it again for each utterance.
SpeakingRate
A speaking-rate multiplier: 1.0 is the engine’s natural pace.
SpeechStream
An utterance, readable while synthesis is still writing it.
SpeechText
Text to speak. Personal content: it must never land in logs, filenames, or command lines.
SpeechWriter
The synthesis end of an utterance. Dropping it without finish ends the speech the way a vanished synthesizer does.
StreamClosed
The writer’s reader is gone or the utterance already ended; there is nobody left to hear more samples.
SynthesisNon-target_family=wasm
A loaded synthesis engine ready to start utterances.
Voice
An engine voice name. Which names exist is each engine’s own affair; this only rejects what no engine could mean.

Enums§

PlaybackErrorNon-target_family=wasm
SpeakingRateError
SpeechTextError
SynthesisError
TryRead
Result of a buffered read.
VoiceError

Traits§

Engine
How an engine is constructed from its own configuration. NAME names the engine in logs and errors; Config carries whatever it needs to load.
Synthesizer
The contract every text-to-speech engine implements.

Functions§

stream
The two ends of one utterance: the writer synthesis appends to, and the stream playback reads from.
validate_model_fileNon-target_family=wasm
crate::backend::validate_model_file, failing as a SynthesisError.