#2624 videotrans.configure._except.StopRetry: The API key you used is missing the permission text_to_speech to execute this op

2602:2b5* Posted at: 5 hours ago 👁5

The API key you used is missing the permission text_to_speech to execute this operation.:
Traceback (most recent call last):
File "videotrans\tts\_elevenlabs.py", line 73, in _run
File "elevenlabs\text_to_speech\client.py", line 163, in convert
File "contextlib.py", line 135, in enter
File "elevenlabs\text_to_speech\raw_client.py", line 210, in convert
File "elevenlabs\text_to_speech\raw_client.py", line 208, in _stream
elevenlabs.core.api_error.ApiError: headers: {'date': 'Mon, 12 Jan 2026 17:26:51 GMT', 'server': 'uvicorn', 'content-length': '144', 'content-type': 'application/json', 'access-control-allow-origin': '', 'access-control-allow-headers': '', 'access-control-allow-methods': 'POST, PATCH, OPTIONS, DELETE, GET, PUT', 'access-control-max-age': '600', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-trace-id': '75b672c94417b1a0464d5abb9c23a131', 'x-region': 'us-central1', 'via': '1.1 google, 1.1 google', 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000'}, status_code: 401, body: {'detail': {'status': 'missing_permissions', 'message': 'The API key you used is missing the permission text_to_speech to execute this operation.'}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 18, in run
File "videotrans\tts\__init__.py", line 294, in run
File "videotrans\tts\_base.py", line 179, in run
File "videotrans\tts\_elevenlabs.py", line 84, 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 439, in result
File "concurrent\futures\_base.py", line 391, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_elevenlabs.py", line 79, in _run
videotrans.configure._except.StopRetry: The API key you used is missing the permission text_to_speech to execute this operation.


=
system:Windows-10-10.0.26100-SP0
version:v3.91
frozen:True
language:zh
root_dir:E:/fanyiruanjian

1 Replies

您使用的 ElevenLabs API Key 缺少 text_to_speech 权限,因此无法进行语音合成操作。

请按以下步骤解决:

  1. 确认 API Key 类型:登录您的 ElevenLabs 账户,检查您当前使用的 API Key 是否为 “语音合成 (Text to Speech)” 类型。ElevenLabs 提供不同权限的 API Key(如仅语音识别、仅语音合成等)。
  2. 生成正确的 API Key

    • 前往 ElevenLabs 官网,进入 “Profile” -> “API Keys” 页面。
    • 点击 “+ Add New API Key”
    • 在创建时,务必勾选 Text to Speech 权限
    • 复制生成的新 Key。
  3. 更新软件中的 Key

    • 在 pyVideoTrans 主界面,点击菜单栏的 “设置” -> “Elevenlabs.io”
    • 将新生成的、具有 text_to_speech 权限的 API Key 粘贴到输入框中。
    • 点击“保存”。

完成以上步骤后,重新尝试配音即可。

请查看更多参考文档:

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