PhilSpiel commited on
Commit
0b627aa
·
1 Parent(s): 45584fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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.append({"role": "assistant", "content": message_content})
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"