# Repository Briefing: jianchang512/ChatTTS-ui
> Source: https://repoforai.com/repo/jianchang512/ChatTTS-ui (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/jianchang512/ChatTTS-ui
- **Official Docs / Website**: https://pyvideotrans.com
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: See repository
- **Engineering Health**: B (52/100 · Maintenance 12/35 · Adoption 20/25 · Releases 14/20 · License 6/20)
- **Latest Release**: v260614 (2026-06-14) — https://github.com/jianchang512/ChatTTS-ui/releases
- **Review Snapshot**: 2026-12-01
- **Deployment / Stack Signals**: Docker, Self-Hosted, Local AI, API, GPU
- **Momentum**: 7,669 ★ total (+2 24h / +5 7d) · 907 forks
- **Topics**: `chattts`, `tts`
- **When to Use**: Best for: Local Chinese and English narration or dubbing when a browser preview, downloadable WAVs, and integration with pyVideoTrans or an internal HTTP client are enough. Skip if: 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.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Runtime: Python `app.py` fronts the bundled `ChatTTS/` engine; Flask, Waitress, and PyTorch are declared dependencies.
- API contract: `POST /tts` accepts form data and returns a JSON `audio_files` array with WAV URLs and absolute server paths.
- Speech controls: Mixed Chinese, English, and digits, with pause and laughter markers, sampling controls, and optional text refinement.
- Voice migration: Seed-based voice selection is available, but releases from 0.96 onward are not directly compatible with older CSV/PT speaker files.
- Device configuration: `.env` exposes `WEB_ADDRESS`, `compile`, and `device`; separate CPU and GPU Docker Compose files are available.
- Release compatibility: v260614 upgrades the ChatTTS core and moves to PyTorch 2.7.1 for NVIDIA RTX 50-series compatibility.
```

## Quick Start / Clone
```bash
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
```
