jianchang512/ChatTTS-ui
Self-hosted ChatTTS with a browser UI and HTTP API for Chinese and English speech
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
app.py is the Python entry point for a browser UI and HTTP API built around the bundled ChatTTS core in ChatTTS/. Flask and Waitress are declared web-serving dependencies. The root tree separates UI assets into templates/ and static/ and provides a speaker/ directory for speaker assets. Inference runs on the deployment host; the external model hosts are used for weight acquisition, not remote speech synthesis.
The integration boundary is a form-encoded POST /tts. The API takes text and synthesis options, generates WAV artifacts, and returns JSON with a result code and an audio_files array. Each entry contains an absolute server filename and a downloadable URL; the example serves files under /static/wavs/. This is a file-oriented interface rather than an audio stream. The declared runtime includes PyTorch, Transformers, Tokenizers, and Vocos, with device selection exposed through .env.
Key Capabilities & Differentiators
ChatTTS-ui handles Chinese, English, and digits in the same input. The prompt field accepts markers such as [oral_2][laugh_0][break_6] for conversational style, laughter, and pauses. The API exposes temperature, top_p, and top_k, with defaults of 0.3, 0.7, and 20, respectively. Text refinement is enabled by default and can be bypassed with skip_refine=1.
Voice selection uses numeric values. A positive integer custom_voice takes precedence over voice, but the same seed can sound different across devices and can even vary in pitch on the same machine. Treat a seed as a selection input, not a reproducibility guarantee. The same endpoint can be configured as a TTS backend in pyVideoTrans 1.82+, and other clients can consume its WAV URLs directly.
Trade-offs & Limitations
Compared with integrating upstream ChatTTS directly, this wrapper gives operators a browser UI and callers a ready-made HTTP contract. In exchange, callers work with downloaded WAV files rather than a documented streaming interface. Compared with a managed service such as ElevenLabs, synthesis stays on infrastructure you control, but model acquisition, Python/CUDA compatibility, capacity planning, and generated-file retention become your responsibility. No measured latency or concurrency figures are available to support a real-time workload decision.
Low-VRAM systems can fall back to CPU, but the device-selection threshold does not predict performance. The response exposes absolute host paths as well as download URLs, so review who can call the API and retrieve artifacts before widening network access. A LICENSE file is present, but its terms are not established here. Verify rights for the application, model weights, and any third-party speaker assets separately before commercial use or redistribution.
Hardware & Deployment Guide
Windows users can unpack the prebuilt release and start app.exe. Source setup on Linux, macOS, and Windows uses a Python virtual environment, requirements.txt, and python app.py; install FFmpeg first. The setup specifies Python 3.9–3.11, while Poetry declares ^3.10, so Python 3.10 is a sensible starting point. The source setup pairs PyTorch and torchaudio at 2.7.1 and specifies cu128 wheels and CUDA 12.8+ for NVIDIA acceleration. Poetry still references PyTorch 2.3/cu118 outside macOS; do not assume those dependency paths are interchangeable.
Run docker compose -f docker-compose.cpu.yaml up -d or use docker-compose.gpu.yaml for the GPU variant. The local default is 127.0.0.1:9966; the container setup describes listening on 0.0.0.0:9966. Check the bind address before widening network access. First startup downloads weights from ModelScope or Hugging Face, but the descriptions of which host is tried first conflict. Version v260614 updates the ChatTTS core and moves to PyTorch 2.7.1 for RTX 50-series compatibility. Earlier upgrades also affected persisted assets: v1.0 required a model re-download, and releases from 0.96 onward stopped accepting older CSV/PT speaker files directly.
app.py fronts the bundled ChatTTS/ engine; Flask, Waitress, and PyTorch are declared dependencies.POST /tts accepts form data and returns a JSON audio_files array with WAV URLs and absolute server paths..env exposes WEB_ADDRESS, compile, and device; separate CPU and GPU Docker Compose files are available.Local Chinese and English narration or dubbing when a browser preview, downloadable WAVs, and integration with pyVideoTrans or an internal HTTP client are enough.
You need live audio streaming, a managed service with no inference maintenance, or commercial rights that are already cleared for the exact model and speaker assets.
Quick Start & Installation
pip install torch==2.7.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128 pip install nvidia-cublas-cu11 nvidia-cudnn-cu11
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| ChatTTS-ui ★ | 7.7k | +5 | Python | — | Self-hosted ChatTTS with a browser UI and HTTP API for Chinese and English speec |
| voicebox | 61.8k | +437 | Python | MIT | Local-first voice studio with multi-engine speech synthesis, dictation and MCP. |
| voice-pro | 13.5k | +34 | Python | GPL-3.0 | Self-hosted Gradio studio for transcription, translation, and dubbing |
| EmotiVoice | 8.5k | — | Python | Apache-2.0 | Self-hosted PyTorch TTS for prompt-controlled Chinese and English speech |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/jianchang512/ChatTTS-ui.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about ChatTTS-ui
How should a separate application consume the TTS API?
/tts with text and any optional synthesis settings. On success, iterate over audio_files and fetch each url; do not use filename as a client-side path, because it is absolute on the server. For a remote deployment, test that the returned URLs are reachable from the client.Is a GPU required, and how should I size the host?
Does self-hosting permit commercial use or redistribution?
LICENSE file, but its terms are not established here. Check the exact release's application license, the upstream ChatTTS code and model-weight terms, and any third-party speaker assets you plan to redistribute or use commercially.When would I choose ChatTTS-ui over ElevenLabs?
/tts contract does not establish API compatibility or streaming parity.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy