WWMachine commited on
Commit
e290870
·
verified ·
1 Parent(s): bc149af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -167,7 +167,7 @@ def run_chat_pipeline(audio_input, history, state_messages):
167
  # 5. Generate Audio (TTS with splitting)
168
  audio_path = text_to_speech(ai_text) # This handles the stitching
169
 
170
- return history, state_messages, audio_path
171
 
172
  # --- Gradio UI Layout ---
173
  with gr.Blocks(title="Voice Chatbot") as demo:
@@ -197,7 +197,7 @@ with gr.Blocks(title="Voice Chatbot") as demo:
197
  submit_btn.click(
198
  fn=run_chat_pipeline,
199
  inputs=[audio_input, chatbot, state_messages],
200
- outputs=[chatbot, state_messages, audio_player]
201
  )
202
 
203
  def clear_all():
 
167
  # 5. Generate Audio (TTS with splitting)
168
  audio_path = text_to_speech(ai_text) # This handles the stitching
169
 
170
+ return history, state_messages, audio_path, None
171
 
172
  # --- Gradio UI Layout ---
173
  with gr.Blocks(title="Voice Chatbot") as demo:
 
197
  submit_btn.click(
198
  fn=run_chat_pipeline,
199
  inputs=[audio_input, chatbot, state_messages],
200
+ outputs=[chatbot, state_messages, audio_player, audio_input]
201
  )
202
 
203
  def clear_all():