#2988 clone-voice错误

39.68* Posted at: 18 days ago 👁46

{'code': 7, 'msg': "400 Bad Request: The browser (or proxy) sent a request that this server could not understand. ('audio',)"}:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 17, in run
File "videotrans\tts\__init__.py", line 324, in run
File "videotrans\tts\_base.py", line 183, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_clone.py", line 71, in _run
RuntimeError: {'code': 7, 'msg': "400 Bad Request: The browser (or proxy) sent a request that this server could not understand. ('audio',)"}

1 Replies

该错误是由于向 clone-voice 服务发送的请求格式不正确,缺少必需的 audio 字段(通常是参考音频文件)导致的。

解决方案

  1. 检查参考音频:确认你在使用 clone 角色或进行声音克隆时,已正确选择了参考音频文件。参考音频应为清晰的人声,时长建议在 3-10 秒。
  2. 验证服务状态

    • 确保 clone-voice 服务已正确启动,并且 API 服务地址(如 http://127.0.0.1:7860)在 pyVideoTrans 的 TTS 设置中配置无误。
    • 尝试在浏览器中直接访问 clone-voice 的 WebUI 界面,确认服务运行正常。
  3. 检查请求参数:此错误表明 pyVideoTrans 发送给 clone-voice 的请求数据中缺少 audio 字段。请确保:

    • 在 pyVideoTrans 的“配音设置”或“TTS设置”中,为 clone-voice 正确指定了参考音频路径。
    • 如果是在“菜单--TTS设置--Qwen-tts(本地)界面”测试时遇到此错误,根据知识库,可尝试清空参考音频文本框内容后再测试,这会使软件尝试使用内置音色连接自定义音色模型。
  4. 确认模型类型:根据知识库,clone-voice 或类似的声音克隆服务(如 F5-TTS、Qwen-TTS)有不同的模型类型。请确保你启动的是语音克隆模型(例如 Qwen3-TTS 的 Base 模型),而不是自定义音色模型或声音设计模型,因为后者不支持基于参考音频的克隆。

请查阅相关文档

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Related resource