#6831 The API key you used is missing the permission text_to_speech to execute this operation.:{'text': 'hello,my friend', 'ro

191.101.**6 Posted at: 3 hours ago

The API key you used is missing the permission text_to_speech to execute this operation.:
{'text': 'hello,my friend', 'role': 'Roger - Laid-Back Casual Resonant', 'filename': 'D:/程序软件/ruanjianxiazaibao/pyvidiotrans/tmp/15960/1787554273.2922428-elevenlabs.wav', 'tts_type': 23}
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 228, in run
File "videotrans\tts\_base.py", line 132, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_elevenlabs.py", line 48, in _run
File "elevenlabs\text_to_speech\client.py", line 157, in convert
File "contextlib.py", line 135, in enter
File "elevenlabs\text_to_speech\raw_client.py", line 204, in convert
File "elevenlabs\text_to_speech\raw_client.py", line 202, in _stream
elevenlabs.core.api_error.ApiError: headers: {'date': 'Mon, 24 Aug 2026 06:51:14 GMT', 'server': 'uvicorn', 'content-length': '244', 'content-type': 'application/json', 'vary': 'Accept-Language', '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=1800;', 'x-trace-id': '8f20ab2a2fee9a335e6bf50bf8170500', 'x-region': 'us-central1', 'via': '1.1 google', 'alt-svc': 'h3=":443"; ma=2592000'}, status_code: 401, body: {'detail': {'type': 'authentication_error', 'code': 'unauthorized', 'message': 'The API key you used is missing the permission text_to_speech to execute this operation.', 'status': 'missing_permissions', 'request_id': '8f20ab2a2fee9a335e6bf50bf8170500'}}


=
system:Windows-10-10.0.26200-SP0
version:v4.09
frozen:True
language:zh
root_dir:D:/程序软件/ruanjianxiazaibao/pyvidiotrans

1 Replies

#1 DeepSeek reply at 3 hours ago

错误原因:你的 ElevenLabs API Key 缺少 text_to_speech(文本转语音)权限,即该密钥无权调用 TTS 接口。ElevenLabs 服务端返回 401 认证错误。

解决步骤:

  1. 登录 ElevenLabs 官网,检查当前 API Key 是否有效且未被删除。
  2. 核对是否为直接在软件「菜单 → 翻译设置 / TTS 设置 → ElevenLabs」中粘贴了正确的 API Key(无多余空格、换行)。
  3. 若你使用的是第三方中转/代理地址,请确认该中转服务是否支持 ElevenLabs 的 text_to_speech 权限;中转只授权了 STT 等其他权限时将报此错。
  4. 在 ElevenLabs 账户中确认该 Key 的权限范围包含 text_to_speech。免费账号可能权限有限,建议在控制台重新生成一个具备 TTS 权限的 Key 后,替换到软件中,并点击「保存」。

如果上述操作后仍报错,请提供软件安装目录下 logs/ 文件夹中最新的日志文件(复制底部约30行报错信息),并告知软件左上角版本号(当前你提交的日志显示为 v4.09)。

Thinking...
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 via ko-fi.com

Related resource