点击查看 Edge-TTS 配音渠道无法使用的解决办法!!!

#1960 TaskCfg(cache_folder='D:/AN/PyVideoTrans/win-pyvideotrans-v3.86/tmp23104/c3be81a467', target_dir='C:/Users/18289/Desktop

142.91* Posted at: 9 hours ago 👁10

翻译字幕阶段出错:[DeepSeek] 无效的值或参数:Expecting value: line 10 column 1 (char 9):
Traceback (most recent call last):
File "videotrans\task\job.py", line 184, in run
File "videotrans\task\trans_create.py", line 423, in trans
File "videotrans\translator\__init__.py", line 922, in run
File "videotrans\translator\_base.py", line 80, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_deepseek.py", line 55, in _item_task
File "openai\_utils\_utils.py", line 286, in wrapper
File "openai\resources\chat\completions\completions.py", line 1156, in create
File "openai\_base_client.py", line 1259, in post
File "openai\_base_client.py", line 1052, in request
File "openai\_base_client.py", line 1141, in _process_response
File "openai\_response.py", line 323, in parse
File "openai\_response.py", line 265, in _parse
File "httpx\_models.py", line 832, in json
File "json\__init__.py", line 346, in loads
File "json\decoder.py", line 337, in decode
File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 10 column 1 (char 9)

TaskCfg(cache_folder='D:/AN/PyVideoTrans/win-pyvideotrans-v3.86/tmp23104/c3be81a467', target_dir='C:/Users/18289/Desktop/SAPP/_video_out/4927052-720p', remove_noise=False, is_separate=False, detect_language='ja', subtitle_language=None, source_language='日语', target_language='简体中文', source_language_code='ja', target_language_code='zh-cn', source_sub='C:/Users/18289/Desktop/SAPP/_video_out/4927052-720p/ja.srt', target_sub='C:/Users/18289/Desktop/SAPP/_video_out/4927052-720p/zh-cn.srt', source_wav='D:/AN/PyVideoTrans/win-pyvideotrans-v3.86/tmp23104/c3be81a467/ja.wav', source_wav_output='C:/Users/18289/Desktop/SAPP/_video_out/4927052-720p/ja.m4a', target_wav='D:/AN/PyVideoTrans/win-pyvideotrans-v3.86/tmp23104/c3be81a467/target.wav', target_wav_output='C:/Users/18289/Desktop/SAPP/_video_out/4927052-720p/zh-cn.m4a', subtitles='', novoice_mp4='D:/AN/PyVideoTrans/win-pyvideotrans-v3.86/tmp23104/c3be81a467/novoice.mp4', noextname='4927052-720p', shibie_audio=None, targetdir_mp4='C:/Users/18289/Desktop/SAPP/_video_out/4927052-720p/4927052-720p.mp4', instrument=None, vocal=None, back_audio='', background_music=None, app_mode='biaozhun', subtitle_type=1, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', copysrt_rawvideo=False, clear_cache=False, translate_type=4, tts_type=0, recogn_type=0, model_name='large-v3-turbo', split_type=0, voice_autorate=True, video_autorate=False, cuda=True, name='C:/Users/18289/Desktop/SAPP/4927052-720p.mp4', basename='4927052-720p.mp4', ext='mp4', dirname='C:/Users/18289/Desktop/SAPP', shound_del_name=None, uuid='c3be81a467', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, auto_fix=True)


=
system:Windows-10-10.0.26200-SP0
version:v3.86
frozen:True
language:zh
root_dir:D:/AN/PyVideoTrans/win-pyvideotrans-v3.86

1 Replies

此错误表明 DeepSeek API 返回了非 JSON 格式的响应,导致解析失败。通常由以下原因导致:

  1. API Key 无效或未设置:请检查 DeepSeek API Key 是否正确,并在“翻译设置”中填入。
  2. 网络代理问题:如果使用代理,请确保代理设置正确且能正常访问 api.deepseek.com
  3. API 服务端临时异常:DeepSeek 服务器可能暂时返回了错误页面。

请按以下步骤排查:

  1. 验证 API Key

    • 前往 DeepSeek 官网确认您的 API Key 有效且未过期。
    • 在 pyVideoTrans 主界面,点击“翻译设置”按钮,找到 DeepSeek 并填入正确的 API Key。
  2. 检查网络代理

    • 如果您需要通过代理访问,请确保在主界面第 5 行的“网络代理”框中填写了正确的代理地址(例如 http://127.0.0.1:7890)。
    • 尝试暂时关闭代理,使用直连测试。
  3. 降低请求并发

    • 在菜单栏选择 工具 -> 高级选项
    • 在“字幕翻译调整”区域,将“同时翻译字幕数”设置为 1
    • 将“翻译后暂停时间/秒”设置为 3 或更高。
  4. 直接测试 API

    • 使用浏览器或 curl 命令测试您的 API Key 是否有效(注意替换 YOUR_API_KEY):

      curl https://api.deepseek.com/chat/completions \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -d '{
      "model": "deepseek-chat",
      "messages": [{"role": "user", "content": "Hello"}],
      "stream": false
      }'
    • 如果返回错误信息,则问题出在 Key 或网络。

如果以上步骤均无法解决,请提供 D:/AN/PyVideoTrans/win-pyvideotrans-v3.86/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

Trending Questions