mrfakename commited on
Commit
1879049
1 Parent(s): 8468a28

Sync from GitHub repo

Browse files

This Space is synced from the GitHub repo: https://github.com/SWivid/F5-TTS. Please submit contributions to the Space there

Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -567,7 +567,7 @@ Have a conversation with an AI using your reference voice!
567
 
568
  last_user_message, last_ai_response = history[-1]
569
  if not last_ai_response:
570
- return None
571
 
572
  audio_result, _ = infer(
573
  ref_audio,
@@ -579,7 +579,7 @@ Have a conversation with an AI using your reference voice!
579
  speed=1.0,
580
  show_info=print, # show_info=print no pull to top when generating
581
  )
582
- return audio_result
583
 
584
  def clear_conversation():
585
  """Reset the conversation"""
@@ -603,7 +603,7 @@ Have a conversation with an AI using your reference voice!
603
  ).then(
604
  generate_audio_response,
605
  inputs=[chatbot_interface, ref_audio_chat, ref_text_chat, model_choice_chat, remove_silence_chat],
606
- outputs=audio_output_chat,
607
  )
608
 
609
  # Handle clear button
 
567
 
568
  last_user_message, last_ai_response = history[-1]
569
  if not last_ai_response:
570
+ return None, gr.update(interactive=True)
571
 
572
  audio_result, _ = infer(
573
  ref_audio,
 
579
  speed=1.0,
580
  show_info=print, # show_info=print no pull to top when generating
581
  )
582
+ return audio_result, gr.update(interactive=True)
583
 
584
  def clear_conversation():
585
  """Reset the conversation"""
 
603
  ).then(
604
  generate_audio_response,
605
  inputs=[chatbot_interface, ref_audio_chat, ref_text_chat, model_choice_chat, remove_silence_chat],
606
+ outputs=[audio_output_chat, audio_input_chat],
607
  )
608
 
609
  # Handle clear button