Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiError: status_code: 401, body: {'detail': {'status': 'needs_authorization' #18

Open
muleskin opened this issue Oct 2, 2024 · 0 comments

Comments

@muleskin
Copy link

muleskin commented Oct 2, 2024

Here's the full error. This is returned when trying to TTS from elevenlabs.

Traceback (most recent call last):
File "C:\Users\Jedd\PycharmProjects\J.A.R.V.I.S\main.py", line 157, in
main()
File "C:\Users\Jedd\PycharmProjects\J.A.R.V.I.S\main.py", line 153, in main
interlocus.speak(processed_input)
File "C:\Users\Jedd\PycharmProjects\J.A.R.V.I.S\modules\Interlocus.py", line 23, in speak
audio = generate(
^^^^^^^^^
File "C:\Users\Jedd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\elevenlabs\generate.py", line 57, in generate
return TTS.generate(text, voice, model, api_key=api_key) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jedd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\elevenlabs\tts.py", line 54, in generate
return bytes(b"".join(response))
^^^^^^^^^^^^^^^^^^
File "C:\Users\Jedd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\elevenlabs\resources\text_to_speech\client.py", line 87, in convert
raise ApiError(status_code=_response.status_code, body=_response_json)
elevenlabs.core.api_error.ApiError: status_code: 401, body: {'detail': {'status': 'needs_authorization', 'message': 'Neither authorization header nor xi-api-key received, please provide one.'}}

Contents of my .env file

ELEVEN_API_KEY='sk_'

JARVIS_MODEL='jarvis:latest' # for local dev and testing of model before pushing to hub

JARVIS_MODEL='fotiecodes/jarvis:latest' # for usage: uncomment and use this instead if you downloaded model from https://ollama.com/fotiecodes/jarvis
VISION_MODEL='llava'
ELEVENLABS_VOICE_ID='Xr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant