fix Audio input in Multimodal Textbox not functional.#12999
Merged
freddyaboulton merged 2 commits intogradio-app:mainfrom Mar 11, 2026
Merged
fix Audio input in Multimodal Textbox not functional.#12999freddyaboulton merged 2 commits intogradio-app:mainfrom
freddyaboulton merged 2 commits intogradio-app:mainfrom
Conversation
Let variables did not have $state which made the stop button and time counter not work correctly. Also improved the stop button logic with an error catch and a safe exit in case of an error. Fixes gradio-app#12985
freddyaboulton
approved these changes
Mar 11, 2026
Collaborator
freddyaboulton
left a comment
There was a problem hiding this comment.
Thanks @JoaoPSC87 ! This lgtm
Collaborator
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/df032a1f08a08828fced3016b3b4258ae90e70cf/gradio-6.9.0-py3-none-any.whlInstall Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@df032a1f08a08828fced3016b3b4258ae90e70cf#subdirectory=client/python"Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/df032a1f08a08828fced3016b3b4258ae90e70cf/gradio-client-2.1.0.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12985
Description
After the Svelte 5 migration, audio recording in
MultimodalTextboxwas broken. The microphone button would get stuck at 0:00 and the stop button wouldn't work.Root cause:
In Svelte 5, plain
letvariables are not reactive, so the DOM does not update when their values change. The variables controlling recording state (is_recording,seconds,has_started, etc) were declared withletinstead of$state().Changes:
$state()inMinimalAudioRecorder.svelteandMinimalAudioPlayer.svelte.catch()tostartMic()for safe error handlingCloses: #12985
AI Disclosure
🎯 PRs Should Target Issues
Closes #12985