#8773 {'code': 7, 'msg':

2408**2f7e Posted at: 3 hours ago

{'code': 7, 'msg': "400 Bad Request: The browser (or proxy) sent a request that this server could not understand. ('audio',)"}
self=CloneVoice(uuid=None, proxy_str=None, last_down_time=0, tts_type=31, len=1, language='zh', play=True, volume='+0%', rate='+0%', pitch='+0Hz', has_done=0, wait_sec=1.0, dub_nums=1, error='{\'code\': 7, \'msg\': "400 Bad Request: The browser (or proxy) sent a request that this server could not understand. (\'audio\',)"}', api_url='http://127.0.0.1:9988', model_name='', is_cuda=False, local_dir=None, is_redubb=False):
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'role': '', 'filename': 'E:/PyVideoTrans/win-pyvideotrans-v4.14/tmp/36468/1794464636.3082995-clonevoice.wav', 'tts_type': 31}
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 119, in run
File "videotrans\tts\_base.py", line 123, in run
videotrans.configure.excepts.DubbingSrtError: {'code': 7, 'msg': "400 Bad Request: The browser (or proxy) sent a request that this server could not understand. ('audio',)"}
self=CloneVoice(uuid=None, proxy_str=None, last_down_time=0, tts_type=31, len=1, language='zh', play=True, volume='+0%', rate='+0%', pitch='+0Hz', has_done=0, wait_sec=1.0, dub_nums=1, error='{\'code\': 7, \'msg\': "400 Bad Request: The browser (or proxy) sent a request that this server could not understand. (\'audio\',)"}', api_url='http://127.0.0.1:9988', model_name='', is_cuda=False, local_dir=None, is_redubb=False)


=
system:Windows-10-10.0.26200-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:E:/PyVideoTrans/win-pyvideotrans-v4.14

1 Replies

#1 DeepSeek reply at 3 hours ago

这是你本地部署的 clone-voice 服务(http://127.0.0.1:9988)返回的 400 错误,因为请求体里缺少该接口要求的 audio(参考音频)字段;这不是 pyVideoTrans 本身的故障。同时,知识库已将 clone-voice 标注为 “已不维护” 渠道,它与当前版本的接口格式很可能已经不一致。

建议按以下方式处理:

  1. 确认角色是否为空:日志中 role=''。clone-voice 的克隆模式需要参考音频;当角色为空、并且未传入 audio 字段时,服务会直接返回 400。
  2. 核对服务版本:确认你启动的是克隆语音项目的 api.py,并且端口是 9988;如果服务代码版本过旧,与 v4.14 期望的请求字段不一致,就会持续报这个错误。
  3. 更推荐的做法:换用仍在维护、且支持克隆的渠道,可避免接口格式变动带来的问题:

    • 内置、开箱可用:F5-TTS(内置)、OmniVoice(内置)、Qwen3-TTS(内置)、Confucius-TTS(内置)、ChatterBox(内置)、ZipVoice(内置)(均含 clone 角色)
    • 本地自行部署:GPT-SoVITS、Index-TTS、CosyVoice、VoxCPM-TTS、FireRed3-TTS
  4. 使用 clone 角色时,还需在 菜单 → 工具/选项 → 高级选项 → 语音识别参数 中将 最短语音持续毫秒设 ≥ 3000,否则截取的参考音频过短也会失败。

若仍需排查 clone-voice 本身,请提供软件安装目录下 logs/ 文件夹中最新日志底部约 30 行,以及你本地 clone-voice 服务的启动日志。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource