Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After Mic records a piece of audio, after the first generation is completed, the second click to generate will fail, prompting that the file does not exist. #327

Open
1247862674 opened this issue Oct 9, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@1247862674
Copy link

Source files under /tmp/gradio are deleted after the first generation

@1247862674 1247862674 added the bug Something isn't working label Oct 9, 2024
@1247862674
Copy link
Author

To create a public link, set share=True in launch().
Traceback (most recent call last):
File "/data/miniconda3/pkgs/whisper-webui/lib/python3.10/site-packages/gradio/processing_utils.py", line 536, in audio_from_file
audio = AudioSegment.from_file(filename)
File "/data/miniconda3/pkgs/whisper-webui/lib/python3.10/site-packages/pydub/audio_segment.py", line 651, in from_file
file, close_file = _fd_or_path_or_tempfile(file, 'rb', tempfile=False)
File "/data/miniconda3/pkgs/whisper-webui/lib/python3.10/site-packages/pydub/utils.py", line 65, in _fd_or_path_or_tempfile
fd = open(fd, mode=mode)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/gradio/8b96c03f439af9d876c6206974c5ca140f7637f654b57f3f45074fabaed89087/audio.wav'

@jhj0517
Copy link
Owner

jhj0517 commented Oct 11, 2024

Hi. I just tried to reproduce this in the latest version of the WebUI and failed.

Currently automatically cached gradio files are cleaned up by this line :

self.app = gr.Blocks(css=CSS, theme=self.args.theme, delete_cache=(60, 3600))

It will remove the cached temp files if they exist for more than an hour, checking every minute.
So if you tried to re-generate within an hour, it should re-generate without a problem.

If you're using an older version of the WebUI, I recommend updating it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants