Simple script for TTS in Chinese
https://spacecruft.org/Chinese/TTS
- Python 100%
| .gitignore | ||
| .python-version | ||
| LICENSE-apache.txt | ||
| README.md | ||
| requirements-dev.txt | ||
| requirements.txt | ||
| tts.py | ||
Chinese TTS
Chinese TTS scripts using Alibaba's Qwen.
Upstream
Install
Dependencies:
sudo apt install sox
pip install -r requirements.txt
Usage
./tts.py
The first time it is run it will download a ~4 GB model from huggingface.
Help
$ ./tts.py --help
usage: tts.py [-h] [--text-file PATH] [-o PATH] [--speaker {Dylan,Serena,Uncle_Fu,Vivian}] [--list-speakers] [--slow | --fast] [--seed SEED] [--temperature TEMPERATURE] [--top-k TOP_K]
[--top-p TOP_P] [--repetition-penalty REPETITION_PENALTY] [--max-new-tokens MAX_NEW_TOKENS]
[text]
Synthesize Standard Mandarin Chinese speech with Qwen3-TTS.
positional arguments:
text Chinese text to synthesize (final positional argument).
options:
-h, --help show this help message and exit
--text-file PATH Read text to synthesize from a file instead of the positional argument.
-o, --output PATH Output WAV filename. Defaults to an auto-incrementing output-NNN.wav.
--speaker {Dylan,Serena,Uncle_Fu,Vivian}
Built-in speaker voice (default: Uncle_Fu).
--list-speakers List the selectable speaker voices and exit.
--slow Speak slowly (default).
--fast Speak at normal speed.
--seed SEED Random seed for reproducible sampling (optional).
--temperature TEMPERATURE
Sampling temperature (optional).
--top-k TOP_K Top-k sampling (optional).
--top-p TOP_P Top-p sampling (optional).
--repetition-penalty REPETITION_PENALTY
Repetition penalty (optional).
--max-new-tokens MAX_NEW_TOKENS
Maximum number of new tokens to generate (optional).
examples:
tts.py "你好,世界。"
tts.py --fast --speaker Vivian "今天天气很好。"
tts.py --text-file story.txt -o story.wav
tts.py --list-speakers
License
Apache 2.0 License. See LICENSE-apache.txt for details.
Copyright © 2026 Jeff Moe