🗣️ ZAI/GLM TTS
Install / 安装
🐳 Docker compose
mkdir /opt/zai-tts
cd /opt/zai-tts
echo "ZAI_USERID=xxxx-yyyy" > .env
echo "ZAI_TOKEN=eyJhbGc..." >> .env
wget https://raw.githubusercontent.com/aahl/zai-tts/refs/heads/main/docker-compose.yml
docker compose up -d
ZAI_USERID和ZAI_TOKEN可在audio.z.ai登录后,通过F12开发者工具在控制台执行localStorage['auth-storage']获取
🐳 Docker run
docker run -d \
--name zai-tts \
--restart=unless-stopped \
-p 8823:80 \
-e ZAI_USERID=xxxx-yyyy \
-e ZAI_TOKEN=eyJhbGc... \
ghcr.io/aahl/zai-tts:main
🤖 Agent Skills
npx skills add aahl/skills --skill zai-tts
🏠 Home Assistant OS Add-on
-
添加加载项仓库
-
安装加载项:
- 刷新页面,找到并点击
智谱TTS - 点击 安装 (Install)
- 切换到 配置 标签页,添加
ZAI_USERID和ZAI_TOKEN环境变量 - 启动并设置开机启动
- 刷新页面,找到并点击
💻 Usage / 使用
🎼 内置音色
system_001: 活泼女声system_002: 温柔女声system_003: 通用男声
如果想要使用克隆的音色,请在
audio.z.ai完成音色克隆,并通过接口http://localhost:8823/v1/models获取
🌐 CURL调用示例
curl --request POST \
--url http://localhost:8823/v1/audio/speech \
--header 'Content-Type: application/json' \
--data '{"voice":"system_001", "input":"hello", "speed":1.0, "volume":1}' \
--output output.wav
🐚 命令行
uvx zai-tts -h
# 获取音色
uvx zai-tts -l
# 语音合成
uvx zai-tts -t 'Hello, world' -o hello.wav
uvx zai-tts -t 'Hello, world' -v system_001 --speed 1.2 > hello.wav
🏠 Home Assistant
- 安装 AI Conversation 集成
点击这里 一键安装,安装完记得重启HA
- 添加 AI Conversation 服务,配置模型提供商
服务商: 自定义; 接口:
http://4e0de88e-zai-tts/v1; 密钥留空 - 添加TTS模型,模型ID随意
- 配置语音助手
Metadata
Release files for zai-tts 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zai_tts-0.1.1.tar.gz | 67.2 kB | Without provenance | Details for zai_tts-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zai_tts-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for zai_tts-0.1.1-py3-none-any.whl |
Total release size: 77.8 kB
Release files / zai_tts-0.1.1.tar.gz
| Download URL | zai_tts-0.1.1.tar.gz |
|---|---|
| Size | 67.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49d7f5696530b1b0c8c3a1ec74b59d512a7dbae5966d19a05ee63ee64c04b823
|
|
BLAKE2b-256 checksum How to use checksums |
99014b123f1d291b551cb0afc09b21cb180977e6cef089cb0c6c92c48ead4c5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / zai_tts-0.1.1-py3-none-any.whl
| Download URL | zai_tts-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4edb46b0efd53865d369cda74e29ecf3f19c4a133bc11458d688d0d221be7d6a
|
|
BLAKE2b-256 checksum How to use checksums |
b7c6287db2e5e698a03c32e6b9c7348af5c0bda8f2bb3f1a66da291fb00c305a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for zai-tts 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.