#8220 The API key you used is missing the permission text_to_speech to execute this operation.:{'text': 'Hello, my dear friend

185.195**5 Posted at: 1 hour ago

The API key you used is missing the permission text_to_speech to execute this operation.:
{'text': 'Hello, my dear friend, I hope every day of yours is wonderful and joyful!', 'role': 'Roger - Laid-Back Casual Resonant', 'filename': 'D:/pyVideoTrans/tmp/21584/1792179079.7324853-elevenlabs.wav', 'tts_type': 24}
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 132, in run
File "videotrans\tts\_base.py", line 125, 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

with self._raw_client.convert(

File "contextlib.py", line 135, in enter
File "elevenlabs\text_to_speech\raw_client.py", line 212, in convert

yield _stream()

File "elevenlabs\text_to_speech\raw_client.py", line 210, in _stream

raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

elevenlabs.core.api_error.ApiError: headers: {'date': 'Fri, 16 Oct 2026 19:31:22 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': '2f6bef0e60396b6f3001bc939c325e45', 'x-region': 'europe-west4', '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': '2f6bef0e60396b6f3001bc939c325e45'}}


=
system:Windows-10-10.0.19045-SP0
version:v4.16
frozen:True
language:ru
root_dir:D:/pyVideoTrans

1 Replies

#1 DeepSeek reply at 1 hour ago

This is caused by your ElevenLabs API key lacking the text_to_speech permission. The current key is only authorized for other operations, so the TTS request is rejected with 401 missing_permissions.

  1. Log in to your ElevenLabs account → go to Profile → API Keys.
  2. Create a new API key, and when selecting permissions make sure text_to_speech is enabled. Alternatively, if you already have a key, delete it and generate a new one with TTS permission.
  3. In pyVideoTrans, update the new key in Menu → TTS Settings → Elevenlabs.io, then save.
  4. Retry the dubbing task.

Make sure your ElevenLabs account has an active subscription or sufficient credits to use TTS.

请查阅相关文档:

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