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.
SynthesisandSessionexist only off wasm.
Structs§
- Session
Non- target_family=wasm - One PCM-producing utterance.
- Speaker
Output playbackand non-target_family=wasm - Checks for an output device at construction and resolves it again for each utterance.
- Speaking
Rate - A speaking-rate multiplier: 1.0 is the engine’s natural pace.
- Speech
Stream - An utterance, readable while synthesis is still writing it.
- Speech
Text - Text to speak. Personal content: it must never land in logs, filenames, or command lines.
- Speech
Writer - The synthesis end of an utterance. Dropping it without
finishends the speech the way a vanished synthesizer does. - Stream
Closed - The writer’s reader is gone or the utterance already ended; there is nobody left to hear more samples.
- Synthesis
Non- 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§
- Playback
Error Non- target_family=wasm - Speaking
Rate Error - Speech
Text Error - Synthesis
Error - TryRead
- Result of a buffered read.
- Voice
Error
Traits§
- Engine
- How an engine is constructed from its own configuration.
NAMEnames the engine in logs and errors;Configcarries 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_ file Non- target_family=wasm crate::backend::validate_model_file, failing as aSynthesisError.