免费快速的语音合成大模型API。 推荐配合 ai_conversation 集成使用。
安装后切换到配置页面,添加ZAI_USERID和ZAI_TOKEN环境变量,可在audio.z.ai登录后,通过F12开发者工具在控制台执行localStorage['auth-storage']获取。
API地址:
http://4e0de88e-zai-tts/v1http://homeassistant.local:28823/v1
使用示例:
curl --request POST \
--url http://homeassistant.local:28823/v1/audio/speech \
--header 'Content-Type: application/json' \
--data '{"voice":"system_001", "input":"hello", "speed":1.0, "volume":1}' \
--output output.wavAI Conversation 配置教程
- 安装 AI Conversation 集成
点击这里 一键安装,安装完记得重启HA
- 添加 AI Conversation 服务,配置模型提供商
服务商: 自定义; 接口:
http://4e0de88e-zai-tts/v1; 密钥留空 - 添加TTS模型,模型ID随意,额外的请求参数参考:
voice: system_002 # 支持克隆的音色ID speed: 1.5 response_format: wav
- 配置语音助手
system_001: 活泼女声
system_002: 温柔女声
system_003: 通用男声