throw error on no api
This commit is contained in:
1 parent
685f8c4ddd
commit
815c4b2a2e
1 file changed
+3
-2
+3
-2
@@ -36,8 +36,9 @@ class elevenlabs:
|
||||
if settings.config["settings"]["tts"]["elevenlabs_api_key"]:
|
||||
api_key = settings.config["settings"]["tts"]["elevenlabs_api_key"]
|
||||
else:
|
||||
api_key = None
|
||||
print("You didn't set an Elevenlabs API key! Trying without API key, but you'll probably hit an error.")
|
||||
raise ValueError(
|
||||
"You didn't set an Elevenlabs API key! Please set the config variable ELEVENLABS_API_KEY to a valid API key."
|
||||
)
|
||||
|
||||
audio = generate(
|
||||
api_key=api_key,
|
||||
|
||||
Reference in new issue
Block a user