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

Large file recognition error #77

Open
SeongGyu1216 opened this issue Jan 15, 2024 · 10 comments · Fixed by #78
Open

Large file recognition error #77

SeongGyu1216 opened this issue Jan 15, 2024 · 10 comments · Fixed by #78
Labels
enhancement New feature or request

Comments

@SeongGyu1216
Copy link

Which OS are you using?

  • OS: [e.g. iOS or Windows.. If you are using Google Colab, just Colab.]
    "Window 11"

Sometimes, when you add a large file or a large amount of files, you can't download it and it keeps uploading.
Can you help me with the above issues?

@SeongGyu1216
Copy link
Author

The name of the extracted srt may also be truncated if the original name is long.
Can this be solved, too?

@jhj0517
Copy link
Owner

jhj0517 commented Jan 15, 2024

when you add a large file or a large amount of files, you can't download it and it keeps uploading.

When you upload files with gr.Files, gradio uploads them to your PC's temp folder first and does the tasks there.
If the file upload time is too long, it might be a problem with gradio uploading the files to the temp folder.
Usually the process has no problem. I recently upgraded gradio version to 4.14.1 so it might be fine if you use latest version of this project.

The name of the extracted srt may also be truncated if the original name is long.
Can this be solved, too?

The name truncation is added to solve the problem of Colab in #68,
But name truncation isn't needed in other local environments, since long name is not problematic in other local environments.
I'm working on making the name truncation happen only in colab.

@jhj0517 jhj0517 added the enhancement New feature or request label Jan 15, 2024
@SeongGyu1216
Copy link
Author

AttributeError: type object 'Checkbox' has no attribute 'update'
The above error is caused by an error on the Translate english? checkbox when changing the model.

ValueError: An event handler (transcribe_file) didn't receive enough output values (needed: 2, received: 1).
The above error is generated when generating an SRT file.

I get an error, but the SRT seems to extract fine!

'''
def safe_filename(name):
INVALID_FILENAME_CHARS = r'[<>:"/\|?*\x00-\x1f]'
return re.sub(INVALID_FILENAME_CHARS, '', name)
safe_name = re.sub(INVALID_FILENAME_CHARS, '
', name)
# Truncate the filename if it exceeds the max_length (20)
if len(safe_name) > 20:
file_extension = safe_name.split('.')[-1]
if len(file_extension) + 1 < 20:
truncated_name = safe_name[:20 - len(file_extension) - 1]
safe_name = truncated_name + '.' + file_extension
else:
safe_name = safe_name[:20]
return safe_name
'''

I added the last line above to subtitle_manager.py and it seems to be working fine. Is this the way to use it?? Sorry if I seem frustrating as a newbie.

@jhj0517 jhj0517 mentioned this issue Jan 15, 2024
@jhj0517
Copy link
Owner

jhj0517 commented Jan 15, 2024

@SeongGyu1216
Don't worry, I'll deal with it.
With #78, the filename truncation doesn't happen anymore in local environments.

You can use the latest version of the project by removing the venv folder and running install.bat again (it would take 20~30minutes.).

Or, if you don't want to do that, you can just manually change the codes by looking at https://github.com/jhj0517/Whisper-WebUI/pull/78/files.

Please feel free to re-open the issue if the problem persists.

@jhj0517 jhj0517 reopened this Jan 15, 2024
@jhj0517 jhj0517 closed this as completed Jan 15, 2024
@SeongGyu1216
Copy link
Author

SeongGyu1216 commented Jan 15, 2024

I just tried it, but for files with a large capacity and a long video time, there is a problem that it cannot be uploaded even if you upload about 10 files.
Is there a limit of capacity or time?

Maybe it's just that the file is large and taking a long time to upload.

@SeongGyu1216
Copy link
Author

image

Uploading more than 10 files will result in such phrases or infinite loading.

@jhj0517
Copy link
Owner

jhj0517 commented Jan 17, 2024

The most likely reason is that your PC is preventing gradio from uploading large files to the C:\Users\NameOfUser\AppData\Local\Temp\ folder.
I don't know why the files cannot be uploaded.

To reproduce the error, I need the approximate size and number of files you tried to upload. Are they all video files?

@jhj0517 jhj0517 reopened this Jan 17, 2024
@SeongGyu1216
Copy link
Author

Yes, that's right, they're all video files.
I know that sometimes I get an error if there is no audio or if the video file is not an extension.
I know that was my mistake and I didn't make that mistake.
Below is a video file with an infinite upload error.
In addition to this, if you have more than 10 large video files (usually less than 10), almost all of them will be uploaded.
(Hours of video are often less than 10 minutes long).
When I do this, I break up the file uploads into 3-5 pieces. This works well.
And when I get the infinite uploading error, it seems like I'm not cleaning up my system's RAM memory.
So I clean up my ram with a separate optimizer, or find the browser leaking ram in the task manager and close it.

  1. there are a lot of problems when uploading more than 5 large items.
  2. that doesn't mean you can upload 20-30 small items. sometimes it won't even upload 15 items.
  3. there seems to be a RAM leak when uploading errors occur.

image

@SeongGyu1216
Copy link
Author

image

@SeongGyu1216
Copy link
Author

image

My C drive is not full, so I don't think it's a capacity issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants