jianchang512/ChatTTS-ui
jianchang512/ChatTTS-ui has 7,670 GitHub stars and 913 forks. GitHot measured -3 stars in 24 hours. Last checked 2026-11-07 12:01 UTC. Last push 2026-06-14.
一个简单的本地网页界面,使用ChatTTS将文字合成为语音,同时支持对外提供API接口。A simple native web interface that uses ChatTTS to synthesize text into speech, along with support for external API interfaces.
Measured star growth
- in 24h
- -3
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README_EN.md
OriginalChatTTS WebUI & API
A simple local web interface to convert text to speech using ChatTTS. It supports mixed Chinese, English, and numbers, and provides an API.
Original ChatTTS project
UI Preview
The model will be downloaded automatically on the first launch. It will try connecting to
https://huggingface.cofirst. If unreachable, it will download from ModelScope (modelscope.cn).Please ensure you have a stable internet connection (a VPN may be needed in some regions) when deploying from source to avoid download failures.
Windows Pre-packaged Version
- Download the zip file from Releases, extract it, and double-click
app.exeto start. - Some antivirus software may trigger false positives. You can temporarily disable them or deploy from source instead.
- GPU acceleration will be enabled if you have an NVIDIA card with more than 4GB VRAM and CUDA 12.8+ installed.
Linux Source Deployment
Set up a Python 3.9–3.11 environment.
Create an empty directory
/data/chatttsand run:cd /data/chattts && git clone https://github.com/jianchang512/chatTTS-ui .Create a virtual environment:
python3 -m venv venvActivate the virtual environment:
source ./venv/bin/activateInstall dependencies:
pip3 install -r requirements.txtFor CPU-only (no CUDA acceleration), run:
pip3 install torch==2.7.1 torchaudio==2.7.1For GPU acceleration (CUDA), run:
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-cu11You will also need to install the CUDA 12.8+ Toolkit yourself.
Run
python3 app.pyto start. A browser window will open automatically at the default addresshttp://127.0.0.1:9966. (Note: By default, the model is downloaded from ModelScope. Please turn off your proxy/VPN during this download, as proxies are not supported for ModelScope).
macOS Source Deployment
Set up a Python 3.9–3.11 environment, install Git, and run:
brew install libsndfile git [email protected]Then run:export PATH="/usr/local/opt/[email protected]/bin:$PATH" source ~/.bash_profile source ~/.zshrcCreate an empty directory
/data/chatttsand run:cd /data/chattts && git clone https://github.com/jianchang512/chatTTS-ui .Create a virtual environment:
python3 -m venv venvActivate the virtual environment:
source ./venv/bin/activateInstall dependencies:
pip3 install -r requirements.txtInstall Torch:
pip3 install torch==2.7.1 torchaudio==2.7.1Run
python3 app.pyto start. A browser window will open automatically athttp://127.0.0.1:9966.
Windows Source Deployment
Download and install Python 3.9–3.11. Make sure to check "Add Python to environment variables" during installation.
Download and install Git: https://github.com/git-for-windows/git/releases/download/v2.45.1.windows.1/Git-2.45.1-64-bit.exe
Create an empty folder named
D:/chattts. Open the folder, typecmdin the address bar, press Enter, and run:git clone https://github.com/jianchang512/chatTTS-ui .Create a virtual environment:
python -m venv venvActivate the virtual environment:
.\venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtFor CPU-only (no CUDA acceleration):
Run
pip install torch==2.7.1 torchaudio==2.7.1For GPU acceleration (CUDA), run:
pip install torch==2.7.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128You will also need to install the CUDA 12.8+ Toolkit yourself.
Run
python app.pyto start. A browser window will open automatically athttp://127.0.0.1:9966. (Note: By default, the model is downloaded from ModelScope. Please turn off your proxy/VPN during this download).
Docker Deployment (Linux)
Installation
Clone the repository
Clone the project into any directory, for example:
git clone https://github.com/jianchang512/ChatTTS-ui.git chat-tts-uiStart the Container
Navigate to the project directory:
cd chat-tts-uiStart the container and view the initialization logs:
# GPU version docker compose -f docker-compose.gpu.yaml up -d # CPU version docker compose -f docker-compose.cpu.yaml up -d docker compose logs -f --no-log-prefixAccess ChatTTS WebUI
Once started on
0.0.0.0:9966, you can access the WebUI using the device'sIP:9966. For example:- Local:
http://127.0.0.1:9966 - Server:
http://192.168.1.100:9966
- Local:
Updating
Get the latest code from the main branch:
git checkout main git pull origin mainStop the container and rebuild with the latest image:
docker compose down # GPU version docker compose -f docker-compose.gpu.yaml up -d --build # CPU version docker compose -f docker-compose.cpu.yaml up -d --build docker compose logs -f --no-log-prefix
Deployment Notes
If your GPU VRAM is less than 4GB, CPU mode will be forced.
On Windows or Linux, if you have an NVIDIA card with >4GB VRAM but the software still uses CPU, try uninstalling and reinstalling Torch. Run
pip uninstall -y torch torchaudiofirst, then reinstall the CUDA version:pip install torch==2.7.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128. Ensure you have CUDA 12.8+ installed.The software checks if ModelScope is accessible. If yes, it downloads the model from ModelScope; otherwise, it downloads from huggingface.co.
Obtaining Voices (Speakers)
Starting from version 0.92, fixed voices in .csv or .pt format are supported. Simply download and save them in the speaker folder inside the software directory.
.pt files can be downloaded from the demo link page of the ChatTTS_Speaker project (https://modelscope.cn/studios/ttwwwaa/ChatTTS_Speaker).
You can also visit http://ttslist.aiqbh.com/10000cn/ to listen to audio samples and copy the corresponding voice seed value into the "Custom Voice Value" text box.
Note: The same voice seed value may sound slightly different across different devices. Even on the same device, the tone or pitch of the same voice seed may vary slightly between generations.
Adjusting Environment Settings
Open the .env file with a text editor to modify the configuration:
WEB_ADDRESS=127.0.0.1:9966 # Modify the Web service address and port
compile=false
device=default # Defaults to CUDA (if VRAM > 4GB) or MPS. You can manually set this to cpu, mps, or cuda
FAQ & Troubleshooting
Modifying the HTTP Address
The default address is http://127.0.0.1:9966. To change this, open the .env file in the project folder and change WEB_ADDRESS=127.0.0.1:9966 to your preferred IP and port (e.g., WEB_ADDRESS=192.168.0.10:9966 to allow local network access).
Using the API (v0.5+)
Request Method: POST
Request URL: http://127.0.0.1:9966/tts
Parameters:
text: str | Required. The text to be synthesized.voice: Optional. Default is 2222. Numeric seed for the voice (e.g., 2222, 7869, 6653, 4099, 5099). Pass any number for a random voice.prompt: str | Optional. Default is empty. Used to insert laughter or pauses, e.g.,[oral_2][laugh_0][break_6].temperature: float | Optional. Default is 0.3.top_p: float | Optional. Default is 0.7.top_k: int | Optional. Default is 20.skip_refine: int | Optional. Default is 0.1= skip text refinement,0= do not skip.custom_voice: int | Optional. Default is 0. Seed value for custom voice. Must be an integer greater than 0. If set, this overrides thevoiceparameter.
Response: JSON
Success:
{
"code": 0,
"msg": "ok",
"audio_files": [
{
"filename": "absolute path to WAV",
"url": "downloadable URL for WAV"
}
]
}
Failure:
{
"code": 1,
"msg": "error details"
}
# API Code Example
import requests
res = requests.post('http://127.0.0.1:9966/tts', data={
"text": "Hello world.",
"prompt": "",
"voice": "3333",
"temperature": 0.3,
"top_p": 0.7,
"top_k": 20,
"skip_refine": 0,
"custom_voice": 0
})
print(res.json())
# Success Response
# {code:0, msg:'ok', audio_files:[{filename: E:/python/chattts/static/wavs/20240601-22_12_12-c7456293f7b5e4dfd3ff83bbd884a23e.wav, url: http://127.0.0.1:9966/static/wavs/20240601-22_12_12-c7456293f7b5e4dfd3ff83bbd884a23e.wav}]}
# Error Response
# {code:1, msg:"error"}
Using with pyVideoTrans
Upgrade pyVideoTrans to 1.82+ (https://github.com/jianchang512/pyvideotrans)
- Click Menu -> Settings -> ChatTTS, and enter the request URL (default is
http://127.0.0.1:9966). - Once the test is successful, select
ChatTTSin the main interface.
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,706 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,222 starsreact/react
The library for web and native user interfaces.
252,357 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,631 stars