"Error"

#1
by nicolasdsp - opened

Hello

First of all, thanks a lot for using JAX with whisper and diarization. I tried it and with every option it gives out error, for example in Audio File and Youtube. It only loads to "diarization".

Conglatulations for this code.

I've tried to duplicate space and returns an error after sent audio. Maybe there's some problem with HF_Token, I don't know.

Hi! Similarly, the code returns an error at the diarization step. I'm available if you need help even though it's quite new for me.

Could you send the stack trace / logs when you do this? Also ensure that you pass your HF authentication tokens as a space "secret" when you duplicate it

Here are the logs on my duplicated space:

===== Application Startup at 2023-08-25 14:31:45 =====

Loaded as API: https://sanchit-gandhi-whisper-jax.hf.space/ โœ”

Downloading (โ€ฆ)lve/main/config.yaml: 0%| | 0.00/500 [00:00<?, ?B/s]
Downloading (โ€ฆ)lve/main/config.yaml: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 500/500 [00:00<00:00, 2.92MB/s]
torchvision is not available - cannot save figures

Downloading pytorch_model.bin: 0%| | 0.00/17.7M [00:00<?, ?B/s]
Downloading pytorch_model.bin: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 17.7M/17.7M [00:00<00:00, 102MB/s]
Downloading pytorch_model.bin: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 17.7M/17.7M [00:00<00:00, 100MB/s]

Downloading (โ€ฆ)/2022.07/config.yaml: 0%| | 0.00/318 [00:00<?, ?B/s]
Downloading (โ€ฆ)/2022.07/config.yaml: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 318/318 [00:00<00:00, 1.84MB/s]

Downloading (โ€ฆ)ain/hyperparams.yaml: 0%| | 0.00/1.92k [00:00<?, ?B/s]
Downloading (โ€ฆ)ain/hyperparams.yaml: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 1.92k/1.92k [00:00<00:00, 11.2MB/s]

Downloading embedding_model.ckpt: 0%| | 0.00/83.3M [00:00<?, ?B/s]
Downloading embedding_model.ckpt: 13%|โ–ˆโ–Ž | 10.5M/83.3M [00:00<00:01, 38.7MB/s]
Downloading embedding_model.ckpt: 25%|โ–ˆโ–ˆโ–Œ | 21.0M/83.3M [00:00<00:01, 48.2MB/s]
Downloading embedding_model.ckpt: 38%|โ–ˆโ–ˆโ–ˆโ–Š | 31.5M/83.3M [00:00<00:01, 36.4MB/s]
Downloading embedding_model.ckpt: 50%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ | 41.9M/83.3M [00:01<00:01, 34.4MB/s]
Downloading embedding_model.ckpt: 76%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Œ | 62.9M/83.3M [00:01<00:00, 33.1MB/s]
Downloading embedding_model.ckpt: 88%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Š | 73.4M/83.3M [00:01<00:00, 39.8MB/s]
Downloading embedding_model.ckpt: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 83.3M/83.3M [00:02<00:00, 45.2MB/s]
Downloading embedding_model.ckpt: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 83.3M/83.3M [00:02<00:00, 40.2MB/s]

Downloading (โ€ฆ)an_var_norm_emb.ckpt: 0%| | 0.00/1.92k [00:00<?, ?B/s]
Downloading (โ€ฆ)an_var_norm_emb.ckpt: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 1.92k/1.92k [00:00<00:00, 12.2MB/s]

Downloading classifier.ckpt: 0%| | 0.00/5.53M [00:00<?, ?B/s]
Downloading classifier.ckpt: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 5.53M/5.53M [00:00<00:00, 31.9MB/s]
Downloading classifier.ckpt: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 5.53M/5.53M [00:00<00:00, 31.4MB/s]

Downloading (โ€ฆ)in/label_encoder.txt: 0%| | 0.00/129k [00:00<?, ?B/s]
Downloading (โ€ฆ)in/label_encoder.txt: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 129k/129k [00:00<00:00, 48.5MB/s]
Running on local URL: http://0.0.0.0:7860

To create a public link, set share=True in launch().
[youtube] Extracting URL: https://www.youtube.com/watch?v=hAO8BUof9IM&ab_channel=InsiderNews
[youtube] hAO8BUof9IM: Downloading webpage
[youtube] hAO8BUof9IM: Downloading ios player API JSON
[youtube] hAO8BUof9IM: Downloading android player API JSON
[youtube] hAO8BUof9IM: Downloading m3u8 information
[youtube] Extracting URL: https://www.youtube.com/watch?v=hAO8BUof9IM&ab_channel=InsiderNews
[youtube] hAO8BUof9IM: Downloading webpage
[youtube] hAO8BUof9IM: Downloading ios player API JSON
[youtube] hAO8BUof9IM: Downloading android player API JSON
[youtube] hAO8BUof9IM: Downloading m3u8 information
[info] hAO8BUof9IM: Downloading 1 format(s): 597+140
[download] Destination: /tmp/tmpvpjtsx7x/video.f597.mp4

[download] 0.0% of 2.12MiB at 208.94KiB/s ETA 00:10
[download] 0.1% of 2.12MiB at 555.54KiB/s ETA 00:03
[download] 0.3% of 2.12MiB at 1.18MiB/s ETA 00:01
[download] 0.7% of 2.12MiB at 2.36MiB/s ETA 00:00
[download] 1.4% of 2.12MiB at 1.37MiB/s ETA 00:01
[download] 2.9% of 2.12MiB at 1.61MiB/s ETA 00:01
[download] 5.9% of 2.12MiB at 1.99MiB/s ETA 00:01
[download] 11.8% of 2.12MiB at 2.83MiB/s ETA 00:00
[download] 23.6% of 2.12MiB at 4.47MiB/s ETA 00:00
[download] 47.2% of 2.12MiB at 7.55MiB/s ETA 00:00
[download] 94.4% of 2.12MiB at 3.22MiB/s ETA 00:00
[download] 100.0% of 2.12MiB at 3.40MiB/s ETA 00:00
[download] 100% of 2.12MiB in 00:00:01 at 1.87MiB/s
[download] Destination: /tmp/tmpvpjtsx7x/video.f140.m4a

[download] 0.0% of 7.85MiB at Unknown B/s ETA Unknown
[download] 0.0% of 7.85MiB at Unknown B/s ETA Unknown
[download] 0.1% of 7.85MiB at 5.61MiB/s ETA 00:01
[download] 0.2% of 7.85MiB at 9.12MiB/s ETA 00:00
[download] 0.4% of 7.85MiB at 14.85MiB/s ETA 00:00
[download] 0.8% of 7.85MiB at 21.31MiB/s ETA 00:00
[download] 1.6% of 7.85MiB at 33.61MiB/s ETA 00:00
[download] 3.2% of 7.85MiB at 47.13MiB/s ETA 00:00
[download] 6.4% of 7.85MiB at 74.72MiB/s ETA 00:00
[download] 12.7% of 7.85MiB at 118.29MiB/s ETA 00:00
[download] 25.5% of 7.85MiB at 183.71MiB/s ETA 00:00
[download] 51.0% of 7.85MiB at 262.33MiB/s ETA 00:00
[download] 100.0% of 7.85MiB at 313.94MiB/s ETA 00:00
[download] 100% of 7.85MiB in 00:00:00 at 138.84MiB/s
[Merger] Merging formats into "/tmp/tmpvpjtsx7x/video.mp4"
Deleting original file /tmp/tmpvpjtsx7x/video.f140.m4a (pass -k to keep)
Deleting original file /tmp/tmpvpjtsx7x/video.f597.mp4 (pass -k to keep)
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/gradio/routes.py", line 442, in run_predict
output = await app.get_blocks().process_api(
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/gradio/blocks.py", line 1389, in process_api
result = await self.call_function(
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/gradio/blocks.py", line 1094, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/gradio/utils.py", line 703, in wrapper
response = f(*args, **kwargs)
File "/home/user/app/app.py", line 254, in transcribe_yt
transcription = align(transcription, segments, group_by_speaker=group_by_speaker)
File "/home/user/app/app.py", line 172, in align
upto_idx = np.argmin(np.abs(end_timestamps - end_time))
File "<__array_function__ internals>", line 200, in argmin
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 1338, in argmin
return _wrapfunc(a, 'argmin', axis=axis, out=out, **kwds)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
return bound(*args, **kwds)
ValueError: attempt to get argmin of an empty sequence

Hi! Were you able to take a look? Still doesn't work for me

ValueError: attempt to get argmin of an empty sequence

This is also the problem that I am getting.

same problem

@sanchit-gandhi @Mickael74 i have subscribe the paid version of TPU Nvidia T4 Medium and it still doesn't work , please help me i can't make works my icelandic audio of 40min , does this model broken? i need it for my final class project ๐Ÿ˜ญ๐Ÿ˜ญ

Sign up or log in to comment