Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def audio_response(text, voice="Sophia"):
|
|
27 |
response = requests.get(url)
|
28 |
|
29 |
print("Response: ")
|
30 |
-
print(response.content)
|
31 |
return response.content
|
32 |
except Exception as e:
|
33 |
return f"Ein Fehler mit der GET_AUDIO_API ist aufgetreten: {e}"
|
@@ -57,6 +57,8 @@ def bot(chat_msg, history=None, audio_tts_checkbox=False):
|
|
57 |
if audio_tts_checkbox==True:
|
58 |
print("AUDIO TTS CHECKBOY IS TURE!")
|
59 |
response_audio = audio_response(bot_message, voice="Sophia")
|
|
|
|
|
60 |
messages.append({"role": "assistant", "content": (gr.Audio(response_audio.encode()) if "Ein Fehler mit der GET_AUDIO_API" not in response_audio else bot_message)})
|
61 |
|
62 |
print("2. Messages:\n")
|
|
|
27 |
response = requests.get(url)
|
28 |
|
29 |
print("Response: ")
|
30 |
+
print(response.content.encode())
|
31 |
return response.content
|
32 |
except Exception as e:
|
33 |
return f"Ein Fehler mit der GET_AUDIO_API ist aufgetreten: {e}"
|
|
|
57 |
if audio_tts_checkbox==True:
|
58 |
print("AUDIO TTS CHECKBOY IS TURE!")
|
59 |
response_audio = audio_response(bot_message, voice="Sophia")
|
60 |
+
print("response_audio:")
|
61 |
+
print(response_audio)
|
62 |
messages.append({"role": "assistant", "content": (gr.Audio(response_audio.encode()) if "Ein Fehler mit der GET_AUDIO_API" not in response_audio else bot_message)})
|
63 |
|
64 |
print("2. Messages:\n")
|