Update app.py
Browse files
app.py
CHANGED
|
@@ -36,8 +36,7 @@ def generate_speech(name, input_text):
|
|
| 36 |
|
| 37 |
# Update the conversation history with the current exchange
|
| 38 |
# This ensures the full history is preserved for the next call but only the latest messages are sent to TTS
|
| 39 |
-
history_openai_format.
|
| 40 |
-
#history_openai_format.extend(current_exchange + [{"role": "assistant", "content": message_content}])
|
| 41 |
|
| 42 |
# Use ElevenLabs TTS API settings and request for the latest assistant response
|
| 43 |
url = "https://api.elevenlabs.io/v1/text-to-speech/eIH76iW9yjOWnOKIkd6y/stream"
|
|
|
|
| 36 |
|
| 37 |
# Update the conversation history with the current exchange
|
| 38 |
# This ensures the full history is preserved for the next call but only the latest messages are sent to TTS
|
| 39 |
+
history_openai_format.extend(current_exchange + [{"role": "assistant", "content": message_content}])
|
|
|
|
| 40 |
|
| 41 |
# Use ElevenLabs TTS API settings and request for the latest assistant response
|
| 42 |
url = "https://api.elevenlabs.io/v1/text-to-speech/eIH76iW9yjOWnOKIkd6y/stream"
|