Skip to main content

Crate rightkit_tts

Crate rightkit_tts 

Source
Expand description

Shared text-to-speech runtime.

Feature boundaries (see Cargo.toml):

  • system: no-model OS voice backend (say on macOS, SAPI on Windows) with a word-timed manifest that can be passed to rightkit-transcript.
  • client: QTS worker client (spawn, chunking, model manifest verification).
  • engine: the vendored Qwen3-TTS worker (worker, binary rightkit-tts-worker); implies client.

wav and the sample-rate constants are always available.

Re-exports§

pub use client::QtsClient;
pub use client::QtsError;
pub use client::SynthOptions;
pub use client::SynthResult;
pub use mode_location::ModeLocation;
pub use protocol::Mode;
pub use protocol::PRESET_SPEAKERS;
pub use system::chunk_sentences;
pub use system::SentenceChunk;
pub use system::SystemTts;
pub use system::SystemTtsError;
pub use system::SystemTtsManifest;
pub use system::SystemTtsOptions;
pub use system::SystemTtsResult;
pub use system::SystemTtsSegment;

Modules§

chunk
Long-text chunking. QTS generates one utterance per call; long scripts are split at sentence boundaries (then clause, then word) and the audio is joined with short pauses.
client
Supervises the warm rightkit-tts-worker process and drives synthesis.
mode_location
Where each model mode lives, and the per-mode engine set a worker keeps.
models
Model files, manifest verification, and where things live.
protocol
Worker wire protocol: one JSON object per line. Worker replies are prefixed with REPLY_PREFIX so ggml/ORT noise on stdout cannot corrupt the stream; the client ignores every other line.
system
OS speech backend. It renders to a temporary file, never opens speakers.
wav
Minimal mono PCM16 WAV helpers.
worker_args
Command line of rightkit-tts-worker. Parsing lives in the library so it is tested under the default features; the binary (feature engine) only applies defaults and runs the worker.

Constants§

QTS_SAMPLE_RATE_HZ
SAMPLE_RATE_HZ