#5702 videotrans.configure.excepts.DubbingSrtError: {'code': 7, 'msg':

2408:8212* Posted at: 4 hours ago

{'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 19, in run
File "videotrans\tts\__init__.py", line 207, in run
File "videotrans\tts\_base.py", line 133, 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',)"}


=
system:Windows-10-10.0.26200-SP0
version:v4.04
frozen:True
language:zh
root_dir:E:/pyvideotrans-

1 Replies

这是 TTS 配音阶段的请求错误。400 Bad Request 表示发出的请求格式服务器无法解析,错误消息中的 ('audio',) 指向请求体中的 audio 参数有问题。常见原因和解决方案如下:

  1. 检查配音渠道和角色配置

    • 如果使用 Edge-TTS:尝试在软件根目录创建空文件 edgetts-noproxy.txt,强制绕过代理(Edge-TTS 有时会因代理干扰发送错误格式的请求)。
    • 如果使用 clone 角色:确保 f5-tts 或相应音频文件夹下存在有效的参考音频(.wav 格式,3-10秒),且文件名与配置一致。参考音频缺失或格式错误会导致向 TTS 引擎发送无效的 audio 参数。
    • 如果使用 GPT-SoVITS / CosyVoice 等本地 API:确认 API 服务已启动并监听正确端口,且软件中 api_v2? 的勾选状态与启动的 API 版本一致(启动 api.py 时不勾选,启动 api_v2.py 时勾选)。版本不匹配会返回 400 错误。
  2. 检查代理设置
    在软件主界面「网络代理」输入框中,若填写了无效的代理(如格式错误或代理服务器不可用),网络请求可能被篡改导致 400。清空代理框 并保存,重新开始任务。
  3. 检查 TTS 渠道是否支持所选语言
    部分本地 TTS 模型(如 VITS、Piper)只支持特定语言。若「目标语言」与配音角色不匹配,渠道可能拒绝请求。请切换为 Edge-TTS 做一次测试(免费,支持所有语言),看是否能正常进行。
  4. 提供完整日志以便进一步排查
    如果上述步骤无效,请从 logs/ 目录中找到最新日志文件(如 20250622.log),复制最后约 30 行报错信息回复。同时说明您当前使用的 配音渠道配音角色

请查阅相关文档:

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. Dondate: ko-fi.com/jianchang512

Related resource