mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-30 09:28:19 -05:00
fix code messup of assistant
This commit is contained in:
@@ -53,6 +53,7 @@ class Config(metaclass=Singleton):
|
||||
|
||||
self.elevenlabs_api_key = os.getenv("ELEVENLABS_API_KEY")
|
||||
|
||||
self.use_mac_os_tts = False
|
||||
self.use_mac_os_tts = os.getenv("USE_MAC_OS_TTS")
|
||||
|
||||
self.google_api_key = os.getenv("GOOGLE_API_KEY")
|
||||
|
||||
@@ -44,7 +44,8 @@ def say_text(text, voice_index=0):
|
||||
if not cfg.elevenlabs_api_key:
|
||||
if cfg.use_mac_os_tts == 'True':
|
||||
macos_tts_speech(text)
|
||||
gtts(text)
|
||||
else:
|
||||
gtts(text)
|
||||
else:
|
||||
success = eleven_labs_speech(text, voice_index)
|
||||
if not success:
|
||||
|
||||
Reference in New Issue
Block a user