auto revert to microphone ready

This commit is contained in:
SWivid
2024-10-26 04:04:44 +08:00
parent 7f826e0261
commit 29b5a4784f

View File

@@ -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