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!', 'rate': '+0%', 'role': 'Roger - Laid-Back Casual Resonant', 'filename': 'C:\Users\ayoub\AppData\Local\Temp/pyvideotrans/24-1792756867.8267477.wav', 'tts_type': 24, 'language': 'en', 'volume': '+0%', 'pitch': '+0Hz'}
Traceback (most recent call last):
File "D:\tiktok bot\pyvideotrans-main\videotrans\util\ListenVoice.py", line 21, in run
tts.run(File "D:\tiktok bot\pyvideotrans-main\videotrans\tts\__init__.py", line 132, in run
return _cls(**kwargs).run() # type:ignoreFile "D:\tiktok bot\pyvideotrans-main\videotrans\tts\_base.py", line 125, in run
raise self.error if isinstance(self.error, Exception) else DubbingSrtError(str(self.error)+f'\n{self=}')File "D:\tiktok bot\pyvideotrans-main.venv\lib\site-packages\tenacity\__init__.py", line 480, in call
result = fn(*args, **kwargs)File "D:\tiktok bot\pyvideotrans-main\videotrans\tts\_elevenlabs.py", line 48, in _run
for chunk in response:File "D:\tiktok bot\pyvideotrans-main.venv\lib\site-packages\elevenlabs\text_to_speech\client.py", line 157, in convert
with self._raw_client.convert(File "C:\Users\ayoub\AppData\Roaming\uv\python\cpython-3.10.19-windows-x86_64-none\lib\contextlib.py", line 135, in enter
return next(self.gen)File "D:\tiktok bot\pyvideotrans-main.venv\lib\site-packages\elevenlabs\text_to_speech\raw_client.py", line 212, in convert
yield _stream()File "D:\tiktok bot\pyvideotrans-main.venv\lib\site-packages\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, 23 Oct 2026 12:01:11 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': '924da835c3937e3b85bb8c60f5140193', 'x-region': 'europe-west4', 'via': '1.1 google', 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":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': '924da835c3937e3b85bb8c60f5140193'}}
=
system:Windows-10-10.0.26200-SP0
version:v4.16
frozen:False
language:en_US
root_dir:D:/tiktok bot/pyvideotrans-main
Python: 3.10.19 (main, Feb 12 2026, 00:37:08) [MSC v.1944 64 bit (AMD64)]