We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fd177d6 + fe1330a commit 30774b3Copy full SHA for 30774b3
software/source/server/services/tts/openai/tts.py
@@ -5,6 +5,18 @@
5
import subprocess
6
import tempfile
7
8
+from source.server.utils.logs import logger
9
+from source.server.utils.logs import setup_logging
10
+setup_logging()
11
+
12
+# If this TTS service is used, the OPENAI_API_KEY environment variable must be set
13
+if not os.getenv('OPENAI_API_KEY'):
14
+ logger.error("")
15
+ logger.error(f"OpenAI API key not found. Please set the OPENAI_API_KEY environment variable, or run 01 with the --local option.")
16
+ logger.error("Aborting...")
17
18
+ os._exit(1)
19
20
client = OpenAI()
21
22
class Tts:
0 commit comments