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

Error on local file transcribe #316

Open
stevevaius2015 opened this issue Oct 4, 2024 · 5 comments
Open

Error on local file transcribe #316

stevevaius2015 opened this issue Oct 4, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@stevevaius2015
Copy link

Which OS are you using?

  • OS: Windows 10
    -Error received when local mp3 and wav files added input to transcribe
    Error message on CMD ValueError: An event handler (transcribe_file) didn't receive enough output values (needed: 2, received: 1). Wanted outputs: [<gradio.components.textbox.Textbox object at 0x000002100939D510>, <gradio.templates.Files object at 0x000002100939D480>] Received outputs: [None]
@stevevaius2015 stevevaius2015 added the bug Something isn't working label Oct 4, 2024
@jhj0517
Copy link
Owner

jhj0517 commented Oct 4, 2024

Hi. I'm not sure what caused this, but it's most likely caused by #271, which is now fixed.

If you encounter the same bug with the new version, please include the full error message.

@CoolSpot
Copy link

CoolSpot commented Oct 8, 2024

OS: Rocky Linux 9
docker 27.3.1 with NVidia runtime provided by nvidia-container-toolkit 1.16.2-1

commit: 4dcedae

full output:

Attaching to app-1
app-1  | Use "faster-whisper" implementation
app-1  | Device "cuda" is detected
app-1  | Running on local URL:  http://0.0.0.0:7860
app-1  | 
app-1  | To create a public link, set `share=True` in `launch()`.
config.json: 100% 2.39k/2.39k [00:00<00:00, 24.4MB/s]
preprocessor_config.json: 100% 340/340 [00:00<00:00, 4.50MB/s]
vocabulary.json: 100% 1.07M/1.07M [00:01<00:00, 620kB/s]
tokenizer.json: 100% 2.48M/2.48M [00:02<00:00, 942kB/s]
model.bin: 100% 3.09G/3.09G [10:35<00:00, 4.86MB/s]B/s]
app-1  | Error transcribing file: [Errno 22] Invalid argument
app-1  | /Whisper-WebUI/venv/lib/python3.11/site-packages/torch/cuda/memory.py:330: FutureWarning: torch.cuda.reset_max_memory_allocated now calls torch.cuda.reset_peak_memory_stats, which resets /all/ peak memory stats.
app-1  |   warnings.warn(
app-1  | Traceback (most recent call last):
app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/queueing.py", line 536, in process_events
app-1  |     response = await route_utils.call_process_api(
app-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/route_utils.py", line 322, in call_process_api
app-1  |     output = await app.get_blocks().process_api(
app-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1945, in process_api
app-1  |     data = await self.postprocess_data(block_fn, result["prediction"], state)
app-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1717, in postprocess_data
app-1  |     self.validate_outputs(block_fn, predictions)  # type: ignore
app-1  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1691, in validate_outputs
app-1  |     raise ValueError(
app-1  | ValueError: An event handler (transcribe_file) didn't receive enough output values (needed: 2, received: 1).
app-1  | Wanted outputs:
app-1  |     [<gradio.components.textbox.Textbox object at 0x7f24793c8490>, <gradio.templates.Files object at 0x7f2428615850>]
app-1  | Received outputs:
app-1  |     [None]

@CoolSpot
Copy link

CoolSpot commented Oct 8, 2024

After some trial and error, it seems like this issue only manifests for me when the input file is a large OGG .
60 minute long meeting audio file 180MB OGG with 30s chunks -> always fails
60 minute long meeting audio file 640MB WAV with 30s chunks -> works

model: large_v2 but fails with tiny.en too
GPU: NVidia RTX 2060 memory utilization 7GB/12GB

It doesn't matter docker or not (this time I tried without docker).

@toasterwave
Copy link

I encountered this "needed 2, received 1" outputs error, but above it also said something about float 16 bit not supported, i changed to 8 bit in the gui settings and it works perfectly now.

@jhj0517
Copy link
Owner

jhj0517 commented Oct 14, 2024

Since many people (probably without CUDA) have problem about compute type,
I tried to fix it by updating the default compute type in #330.

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

4 participants