Open Tejaswgupta opened 5 months ago
I have the same issue after updating from ~=3.28 to ~=4.31. I see that None
is passed the first time, and the valid file path the second. I do not see a valid workaround.
with self.chat_ui as blocks:
client_session = gradio.State(self._start_session())
client_session.attach_load_event(self._start_session, None)
# Define primary UI
blocks.title = title
chatbot = gradio.Chatbot(label=chatbot_label)
with gradio.Row():
textbox = gradio.Textbox(label=text_label,
placeholder=placeholder,
scale=7)
audio_input = gradio.Audio(sources=["microphone"],
type="filepath",
label=speech,
editable=False,
scale=3)
submit = gradio.Button(value="Submit",
variant="primary")
LOG.debug("Created input elements")
tts_audio = gradio.Audio(autoplay=True, visible=False)
LOG.debug("Created audio element")
submit.click(self.on_user_input,
inputs=[textbox, chatbot, audio_input,
client_session],
outputs=[chatbot, client_session, textbox,
audio_input, tts_audio])
This is probably related to the fact that the audio is being uploaded to the server while you click submit. So if you were to click submit while the file is uploaded, the value passed to your function would be None.
Describe the bug
When submitting the audio recorded from the browser , clicking on submit for processing ends up with no text , clicking on it again provides with the transcription. Not sure if it's related to my code or something with Gradio(saw the same issue on SeamlessM4t Space)
Have you searched existing issues? π
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
I can work around it