Skip to content

About

Local, offline text-to-speech with custom voices, voice design, and cloning. Powered by Qwen3-TTS and GPU inference.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Repository files navigation

Local TTS Studio

Type a line, hear it back on this GPU (or CPU). Preset voices, design, clone, then mix a multi-speaker timeline. No cloud TTS account.

CI Python 3.10+ Qwen3-TTS License: MIT

Install · What it does · API · mp4 with sound

Local TTS Studio: script well, Generate, GPU ready

Speech is synthesized with Qwen3-TTS through a hexagonal Python core and a single-file UI (simple-ui.html). Core TTS does not need an API key. Optional music search uses Jamendo / Freesound / Openverse keys if you add them.

Install

Python 3.10+, ~15 GB disk. NVIDIA 6 GB VRAM is comfortable; CPU works and is slow. First start downloads ~10 GB of weights. Later starts are about 30s.

git clone https://github.com/sammy995/Local-TTS-Studio.git
cd Local-TTS-Studio
# Windows
./install.ps1
# macOS / Linux
chmod +x install.sh && ./install.sh

Open http://localhost:8000.

Manual venv
python -m venv .venv
# Windows: .venv\Scripts\activate
# macOS/Linux: source .venv/bin/activate
pip install -e .
local-tts

ffmpeg is required for MP3/M4A export. WAV works without it (winget install Gyan.FFmpeg, brew install ffmpeg, or apt install ffmpeg).

Hardware
Floor Comfortable
GPU GTX 1660 (6 GB) RTX 3060+ (8 GB+)
RAM 16 GB 32 GB
Disk 15 GB 20 GB

Low VRAM: set default_size: "0.6B" in config.yaml.

Pre-download weights
pip install -U "huggingface_hub[cli]"
huggingface-cli download Qwen/Qwen3-TTS-Tokenizer-12Hz        --local-dir models/Qwen3-TTS-Tokenizer-12Hz
huggingface-cli download Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice --local-dir models/Qwen3-TTS-12Hz-1.7B-CustomVoice
huggingface-cli download Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign --local-dir models/Qwen3-TTS-12Hz-1.7B-VoiceDesign
huggingface-cli download Qwen/Qwen3-TTS-12Hz-1.7B-Base        --local-dir models/Qwen3-TTS-12Hz-1.7B-Base

What it does

Single voice

  • Nine multilingual presets (English, Chinese, Japanese, Korean, and more)
  • Voice design from a text description
  • Clone from a short MP3 / M4A / WAV (ICL or x-vector)

Podcast compiler

  • Up to 10 speakers, mixing preset / designed / cloned voices
  • Per-segment timing, volume, emotion
  • Same script in, same audio out
  • A failed segment becomes silence instead of aborting the render

Timeline

  • Speech + music lanes
  • Search royalty-free tracks (Jamendo, Freesound, Openverse)
  • Ducking under speech, loop / trim / fade, live duration

Output: WAV, MP3, FLAC, with progress over Server-Sent Events.

Custom Voice Voice Design
Custom Voice Voice Design
Voice Clone Podcast Mode
Voice Clone Podcast Mode

Layout

Ports and adapters. Details in ARCHITECTURE.md.

core/            compute (no I/O)
services/        tts, podcast, music
infra/           storage adapters
runtimes/        FastAPI
simple-ui.html   frontend, no build step
config.yaml      tunables
run_local.py     entry
brag-output/     launch reel

Configuration

config.yaml:

models:
  default_size: "1.7B"     # or "0.6B"

music_apis:
  jamendo:   { client_id: "" }   # https://devportal.jamendo.com
  freesound: { token: "" }       # https://freesound.org/apiv2/apply
  openverse: { token: "" }       # anonymous search works

Copy .env.example to .env for secrets. .env is gitignored.

API

Base: http://localhost:8000. TTS endpoints take multipart form fields.

Method Path Job
POST /api/tts/custom-voice Preset speaker
POST /api/tts/voice-design Description → voice
POST /api/tts/voice-clone Reference audio
POST /api/podcast/render Multi-speaker script
POST /api/podcast/render/v3 Speech + music timeline
GET /api/progress/{session_id} SSE progress
GET /api/health Health
GET /api/system/info Device and loaded models
curl -X POST http://localhost:8000/api/tts/custom-voice \
  -F "text=Hello from this machine." \
  -F "speaker=Serena" \
  -F "language=English" \
  --output hello.wav

More routes: speakers, languages, music search/import, asset upload. See the FastAPI docs on the running server.

When it misbehaves

Symptom What to try
CUDA out of memory default_size: "0.6B", close other GPU apps
MP3 / M4A export fails Install ffmpeg. WAV still works.
First generation ~30s Weights loading. Later runs ~8–12s on an RTX 3060.
Flash Attention warning Optional; ignore.
Music search empty Put a free key under music_apis.
Clone drifts between runs Pass ref_text with ref_audio (ICL).

Still open

  • Extra engines next to Qwen3-TTS (Piper, Kokoro, XTTS-v2)
  • A/B the same line across engines
  • Settings panel for engine / device / output dir
  • OpenAI-compatible /v1/audio/speech

Ollama-backed podcast script drafting exists in services/ and tests. Wire-up in the desk UI is the remaining piece.

Issues · CONTRIBUTING.md · SECURITY.md

License

MIT: LICENSE. Qwen3-TTS weights follow their license. This repo is the UI and orchestration layer.

Qwen3-TTS, FastAPI, Jamendo, Freesound, Openverse.

About

Local, offline text-to-speech with custom voices, voice design, and cloning. Powered by Qwen3-TTS and GPU inference.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages