From 29b5a4784f5aa7ef6602286ecf6f2da441b9a92d Mon Sep 17 00:00:00 2001 From: SWivid Date: Sat, 26 Oct 2024 04:04:44 +0800 Subject: [PATCH] auto revert to microphone ready --- src/f5_tts/infer/infer_gradio.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/f5_tts/infer/infer_gradio.py b/src/f5_tts/infer/infer_gradio.py index 87d1276..edcaca5 100644 --- a/src/f5_tts/infer/infer_gradio.py +++ b/src/f5_tts/infer/infer_gradio.py @@ -567,7 +567,7 @@ Have a conversation with an AI using your reference voice! last_user_message, last_ai_response = history[-1] if not last_ai_response: - return None + return None, gr.update(interactive=True) audio_result, _ = infer( ref_audio, @@ -579,7 +579,7 @@ Have a conversation with an AI using your reference voice! speed=1.0, show_info=print, # show_info=print no pull to top when generating ) - return audio_result + return audio_result, gr.update(interactive=True) def clear_conversation(): """Reset the conversation""" @@ -603,7 +603,7 @@ Have a conversation with an AI using your reference voice! ).then( generate_audio_response, inputs=[chatbot_interface, ref_audio_chat, ref_text_chat, model_choice_chat, remove_silence_chat], - outputs=audio_output_chat, + outputs=[audio_output_chat, audio_input_chat], ) # Handle clear button