#1616 requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://openspeech.bytedance.com/api/v1/tts

240e:3b3* Posted at: 1 day ago 👁18

400 Client Error: Bad Request for url: https://openspeech.bytedance.com/api/v1/tts:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 18, in run
File "videotrans\tts\__init__.py", line 303, in run
File "videotrans\tts\_base.py", line 177, in run
File "videotrans\tts\_doubao.py", line 138, in _item_task
File "videotrans\tts\_doubao.py", line 121, in _run
File "requests\models.py", line 1026, in raise_for_status
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://openspeech.bytedance.com/api/v1/tts


=
system:Windows-10-10.0.19044-SP0
version:v3.85
frozen:True
language:zh
root_dir:C:/win-pyvideotrans-v3.85

1 Replies

这是字节火山 TTS 接口返回的 400 错误,通常表示请求参数有问题。请按以下步骤排查:

  1. 检查 API 密钥配置:在软件设置中确认字节火山 TTS 的 API Key 和 Secret Key 填写正确且未过期。
  2. 验证文本内容:确保待配音的文本内容符合字节火山 TTS 的要求,避免包含特殊字符或超长文本。
  3. 调整配音参数

    • 在菜单栏选择 工具/选项 -> 高级选项
    • 在“配音调整”区域,将“同时配音字幕数”改为 1
    • 将“配音后暂停时间/秒”改为 3-5
  4. 切换配音角色:尝试更换为其他可用的字节火山配音角色,某些特定角色可能存在服务问题。

如果问题依旧,建议暂时切换到其他 TTS 服务(如 Edge-TTS)继续工作,或者提供完整的日志文件(位于 C:/win-pyvideotrans-v3.85/logs/ 目录下)以便进一步分析。

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.

Donate: https://ko-fi.com/jianchang512

Similar issues already exist

Trending Questions