#7452 {"error":{"err_code":-10002,"message":"Invalid API Key, for details please view 302.AI","message_cn":"无效的API KEY,更多请访问 3

2605**919 Posted at: 1 hour ago

{"error":{"err_code":-10002,"message":"Invalid API Key, for details please view 302.AI","message_cn":"无效的API KEY,更多请访问 302.AI","message_jp":"無効なAPIキーです。詳細は 302.AI をご覧ください。 ","type":"api_error"}}:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunyi:DragonHDFlashLatestNeural(Male)', 'filename': 'C:\Users\windos\AppData\Local\Temp/pyvideotrans/33-1789798863.8562505.wav', 'tts_type': 33, 'language': 'zh-cn', 'volume': '+0%', 'pitch': '+0Hz'}
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 232, in run
File "videotrans\tts\_base.py", line 97, in run
File "videotrans\tts\_base.py", line 200, in _exec
File "videotrans\tts\_base.py", line 160, in _local_mul_thread
File "videotrans\tts\_base.py", line 212, in _item_task
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 400, in
File "concurrent\futures\_base.py", line 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_ai302tts.py", line 66, in _run
videotrans.configure.excepts.StopTask: {"error":{"err_code":-10002,"message":"Invalid API Key, for details please view 302.AI","message_cn":"无效的API KEY,更多请访问 302.AI","message_jp":"無効なAPIキーです。詳細は 302.AI をご覧ください。 ","type":"api_error"}}


=
system:Windows-10-10.0.22631-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:F:/视频配音

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因是 302.AI 渠道的 API Key 无效或未正确填写,与软件本身无关。报错 Invalid API Key / err_code: -10002 明确指向 302.AI 平台的鉴权失败。

解决方案:

  1. 访问 302.AI 官网,登录你的账号,进入 API Key / 密钥管理页面,复制完整且有效的 API Key(确保已充值或账户状态正常)。
  2. 在 pyVideoTrans 中打开 菜单 → 翻译设置 / TTS设置 → 302.AI,将新的 API Key 粘贴进去并保存(注意不要有前后空格)。
  3. 若你只是试用配音,建议直接改用免费的 Edge-TTS 渠道,无需任何 Key,开箱即用,声音质量也不错。
  4. 如确认 Key 填写无误仍报错,请到 302.AI 后台检查该 Key 是否被禁用、余额是否为 0。

请查阅相关文档:

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