What happened / 发生了什么
配置 GSV TTS (Local) 后,发送消息触发 TTS 时,日志报错 404 或 TypeError。
根本原因是 gsv_selfhosted_source.py 与 GPT-SoVITS api.py 的实际接口存在 4 处不兼容:
- 端点错误:代码硬编码 GET /tts,但 GSV api.py 只提供 POST /
- 参数类型错误:default_params 通过 str(value).lower() 把所有参数转成字符串,GSV 期望 top_p/temperature 等为数值
- 字段名不匹配:ref_audio_path / prompt_lang / text_lang 应为 refer_wav_path / prompt_language / text_language
- 布尔值错误:split_bucket=True 被转成字符串 "true",GSV 期望 JSON 布尔值
修复后测试通过,中文 TTS 推理正常。
Reproduce / 如何复现?
- 部署 GPT-SoVITS V2 Docker 容器(api.py 模式)
- AstrBot 中配置 GSV TTS (Local),API Base URL 指向 GSV 地址
- 发送消息触发 TTS
- 观察日志:先报 404 Not Found,手动改端点后报 TypeError: '<' not supported between instances of 'str' and 'float'
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
v4.26.5,Docker 部署(Unraid),GSV TTS (Local) 提供商,QQ 消息平台
OS
Linux
Logs / 报错日志
[GSV TTS] Request to http://192.168.31.46:9880/tts failed with status 404: {"detail":"Not Found"}
TypeError: '<' not supported between instances of 'str' and 'float'
File ".../utils.py", line 169, in logits_to_probs
if top_p is not None and top_p < 1.0:
[GSV TTS] 请求 http://192.168.31.46:9880/ 最终失败:Response payload is not completed
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct
What happened / 发生了什么
配置 GSV TTS (Local) 后,发送消息触发 TTS 时,日志报错 404 或 TypeError。
根本原因是 gsv_selfhosted_source.py 与 GPT-SoVITS api.py 的实际接口存在 4 处不兼容:
修复后测试通过,中文 TTS 推理正常。
Reproduce / 如何复现?
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
v4.26.5,Docker 部署(Unraid),GSV TTS (Local) 提供商,QQ 消息平台
OS
Linux
Logs / 报错日志
[GSV TTS] Request to http://192.168.31.46:9880/tts failed with status 404: {"detail":"Not Found"}
TypeError: '<' not supported between instances of 'str' and 'float'
File ".../utils.py", line 169, in logits_to_probs
if top_p is not None and top_p < 1.0:
[GSV TTS] 请求 http://192.168.31.46:9880/ 最终失败:Response payload is not completed
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct