Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def bot(chat_msg, history=None, audio_tts_checkbox=False):
|
|
50 |
)
|
51 |
bot_message = completion.choices[0].message.content
|
52 |
|
53 |
-
if audio_tts_checkbox
|
54 |
print("AUDIO TTS CHECKBOY IS TURE!")
|
55 |
response_audio = audio_response(bot_message, voice="Sophia")
|
56 |
messages.append({"role": "assistant", "content": (gr.Audio(response_audio) if "Ein Fehler mit der GET_AUDIO_API" not in response_audio else bot_message)})
|
|
|
50 |
)
|
51 |
bot_message = completion.choices[0].message.content
|
52 |
|
53 |
+
if audio_tts_checkbox==True:
|
54 |
print("AUDIO TTS CHECKBOY IS TURE!")
|
55 |
response_audio = audio_response(bot_message, voice="Sophia")
|
56 |
messages.append({"role": "assistant", "content": (gr.Audio(response_audio) if "Ein Fehler mit der GET_AUDIO_API" not in response_audio else bot_message)})
|