Whisper-WebUI
Whisper-WebUI copied to clipboard
Error on local file transcribe
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]
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.
OS: Rocky Linux 9 docker 27.3.1 with NVidia runtime provided by nvidia-container-toolkit 1.16.2-1
commit: 4dcedaee5a59df051ee595a47e38c36a4d90d6d1
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]
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).
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.
Since many people (probably without CUDA) have problem about compute type, I tried to fix it by updating the default compute type in #330.