Skip to main content

Crate forge_tts

Crate forge_tts 

Source
Expand description

Speech synthesis: text in, audio chunks out.

A leaf crate. It depends on no other forge crate and knows nothing about a seat, a tool or a wire: a host hands SpeakRequests to an Engine and reads Chunks off the returned channel. Which engine renders, and when a chunk reaches the speaker, stays with the host.

Re-exports§

pub use engine::DEFAULT_VOICE;
pub use engine::KokoroTts;
pub use engine::SAMPLE_RATE;
pub use engine::select_voice;
pub use error::Error;
pub use model::ModelFiles;
pub use split::sentences;
pub use split::within_bound;

Modules§

bench
The speaking bench: synthesize a corpus’s transcripts, transcribe them back through a caller-supplied recognizer, and score the round trip with its first-audio time, realtime factor and the resident set it needed.
engine 🔒
The in-process Kokoro-82M engine.
error 🔒
model 🔒
The files a speaking model is made of: one ONNX model and a directory of <voice>.bin styles.
split 🔒
Splitting an utterance into render units, and the bound one must fit.

Structs§

Chunk
A rendered run of audio, in arrival order.
SpeakRequest
One utterance to render, with the voice it renders in.

Traits§

Engine
Text-to-speech rendering. Channels rather than &mut self, so a caller can hold one engine and serve every queue without a mutex on the render path.