mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 14:04:27 +01:00
add my fixes
This commit is contained in:
@@ -46,15 +46,21 @@ def gtts_speech(text):
|
||||
playsound("speech.mp3", True)
|
||||
os.remove("speech.mp3")
|
||||
|
||||
def macos_tts_speech(text):
|
||||
os.system(f'say "{text}"')
|
||||
def macos_tts_speech(text, voice_index=0):
|
||||
if voice_index == 0:
|
||||
os.system(f'say "{text}"')
|
||||
else:
|
||||
if voice_index == 1:
|
||||
os.system(f'say -v "Ava (Premium)" "{text}"')
|
||||
else:
|
||||
os.system(f'say -v Samantha "{text}"')
|
||||
|
||||
def say_text(text, voice_index=0):
|
||||
|
||||
def speak():
|
||||
if not cfg.elevenlabs_api_key:
|
||||
if cfg.use_mac_os_tts == 'True':
|
||||
macos_tts_speech(text)
|
||||
macos_tts_speech(text, voice_index)
|
||||
else:
|
||||
gtts_speech(text)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user