Text-to-Speech
Write or paste text. Choose voice, language (EN/RO/ZH/auto), backend, adapter, NFE steps (4–64), sampler (Euler/Midpoint/RK4), speed (0.5–2.0×), seed and chunking mode. Generate, inspect the waveform, play the result and export WAV.
Interface reference
The command-line table below is generated from the live argparse
definition in main.py during the site build. If a flag is not in
that table, it does not exist.
Invocation: python main.py [options]
| Flag | Value | Default | Description |
|---|---|---|---|
--cli |
— | not set | Run in CLI mode instead of GUI |
--version |
— | not set | Show program's version number and exit |
| Flag | Value | Default | Description |
|---|---|---|---|
--text, -t |
str
|
not set | Text to synthesize |
--file, -f |
Path
|
not set | Text file to synthesize |
--voice, -v |
str
|
not set | Voice profile to use (name or path to reference audio) |
--output, -o |
Path
|
output.wav | Output audio file path (default: output.wav) |
--backend, -b |
{f5-tts,gpt-sovits,fish-speech}
|
f5-tts | TTS backend to use (default: f5-tts) |
| Flag | Value | Default | Description |
|---|---|---|---|
--quantization, -q |
{fp16,int8,int4,gguf-q4,gguf-q8}
|
int8 | Quantization level (default: int8) |
--device |
{cuda,cpu,auto}
|
auto | Device to use (default: auto) |
--backend accepts f5-tts, gpt-sovits and
fish-speech. The ONNX / OpenVINO / TensorRT / DirectML /
llama.cpp / vLLM classes live in the registry used by the GUI and auto-selector;
their synthesis methods are not implemented.
# Short text
python main.py --cli --text "Hello from the studio." --output hello.wav
# From a UTF-8 text file
python main.py --cli --file input.txt --output output.wav
# Reference audio for zero-shot cloning
python main.py --cli --text "Hello" \
--voice reference.wav --backend f5-tts --output cloned.wav
# Force CPU and FP16
python main.py --cli --text "Hello" --device cpu --quantization fp16
--voice accepts a path to a reference audio file
(WAV/MP3/FLAC/OGG/M4A) or the name/ID of a saved speaker profile. Profiles
are stored in ~/.config/voicesynth/profiles.db.
--text or --file; the process exits non-zero otherwise.synthesize() call.auto uses a character heuristic: Romanian diacritics → ro, CJK → zh, otherwise en.Launch with python main.py. The main window is a tabbed workspace with a GPU monitor on the right.
Write or paste text. Choose voice, language (EN/RO/ZH/auto), backend, adapter, NFE steps (4–64), sampler (Euler/Midpoint/RK4), speed (0.5–2.0×), seed and chunking mode. Generate, inspect the waveform, play the result and export WAV.
Drop a reference clip, transcribe it with faster-whisper if installed, review/edit the transcript, then save a profile. The profile can be selected anywhere a voice is requested.
Shows the registry entries and install hints. The panel exposes options for ONNX providers, llama.cpp context/GPU layers, OpenVINO devices and DirectML device IDs; these configure loaders, not missing synthesis code.
Lists supported methods and memory estimates. The bitsandbytes path is implemented; GGUF/GPTQ/AWQ conversion controls are placeholders and the UI warns about that.
Four built-in VRAM presets (Ultra Low, Low, Balanced, Quality) plus custom presets persisted as JSON. Presets are configuration templates; they do not benchmark your machine.
Paste one job per line, choose priority, voice and adapter. The queue runs jobs through the same inference manager with pause, resume, cancel and per-job status.
VRAM, utilization, temperature and memory-manager statistics. Without NVML the widget degrades to a “not available” state instead of crashing.
A SpeakerProfile stores a name, tags, description, reference
samples (path, transcript, duration), a quality score and optional
embedding data. Profiles can be exported/imported as human-readable
.vsp JSON files.
Sample quality is scored locally from duration, RMS energy, clipping and silence ratio. The voice-fusion module can blend multiple spectral embeddings (average, quality-weighted, duration-weighted), but the GPT-SoVITS and Fish branches currently reuse a generic mel-statistics embedding rather than their native encoders.
The queue is a priority worker thread. Jobs carry text, voice, adapter, optional reference audio and output path. Callbacks fire on start, progress, completion and error.
from core.batch_queue import BatchQueue, JobPriority
queue = BatchQueue(inference_manager=manager)
queue.add_batch(
texts=["First line.", "Second line."],
voice="reference.wav",
output_dir="out",
priority=JobPriority.NORMAL,
)
queue.start()
The orchestrator is small enough to embed directly.
from core.inference_manager import InferenceManager
manager = InferenceManager(backend="f5-tts", quantization="int8", device="auto")
audio, sample_rate = manager.synthesize(
text="The tape is rolling.",
voice="reference.wav", # optional path or profile name
nfe_steps=16,
speed=1.0,
language="en",
)
manager.save_audio(audio, "out.wav", sample_rate)
manager.unload_model()
synthesize() returns (numpy.ndarray, sample_rate).
The CLI used to discard the second element — fixed in this revamp.
| Module | What it does | Wired into CLI? |
|---|---|---|
core.chunking | Sentence/character/token/paragraph chunking and crossfaded audio stitching, plus LongTextSynthesizer. | No — library/UI-level |
core.memory_manager | LRU model registry, VRAM budget, eviction callbacks and CPU offload helpers. | Monitor only |
core.profile_database | SQLite profiles, quality scoring and .vsp exchange. | Voice resolution |
core.voice_fusion | Spectral embedding extraction and fusion strategies. | No |
core.quantization | Method catalogue, memory estimates, bitsandbytes helper; GGUF/GPTQ/AWQ conversion is a placeholder. | No — GUI panel |
core.presets | Built-in and custom VRAM presets persisted as JSON. | No — GUI panel |
core.backend_registry | Registration, availability checks and a VRAM-based auto-selector. | No — GUI |