-
Notifications
You must be signed in to change notification settings - Fork 1k
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
IndexError: list index out of range in add_word_timestamps function #1118
Comments
I'm aware that this error exists but I had no luck in reproducing it, can you write the exact steps to reproduce and upload the audio file? |
Yes. The sample python code that generates the issue:
And the audio sample is attached. |
I was not able to reproduce it on my machine or using colab |
Maybe python version, debian, pytorch... or something is slightly different on our setups. Anything I can do on my side to get more debug logs to see what is the issue? |
are you using the master branch? faster-whisper/faster_whisper/transcribe.py Lines 1561 to 1595 in 203dddb
|
the same here, while test whisper_streaming Traceback (most recent call last):
File "C:\Users\kr.mao\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 187, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Users\kr.mao\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 110, in _get_module_details
__import__(pkg_name)
File "F:\Workspace\skills\python3\whisper_streaming\whisper_online_server.py", line 183, in <module>
proc.process()
File "F:\Workspace\skills\python3\whisper_streaming\whisper_online_server.py", line 162, in process
o = online.process_iter()
File "F:\Workspace\skills\python3\whisper_streaming\whisper_online.py", line 378, in process_iter
res = self.asr.transcribe(self.audio_buffer, init_prompt=prompt)
File "F:\Workspace\skills\python3\whisper_streaming\whisper_online.py", line 138, in transcribe
return list(segments)
File "F:\Workspace\skills\python3\whisper_streaming\venv\lib\site-packages\faster_whisper\transcribe.py", line 2016, in restore_speech_timestamps
for segment in segments:
File "F:\Workspace\skills\python3\whisper_streaming\venv\lib\site-packages\faster_whisper\transcribe.py", line 1256, in generate_segments
self.add_word_timestamps(
File "F:\Workspace\skills\python3\whisper_streaming\venv\lib\site-packages\faster_whisper\transcribe.py", line 1595, in add_word_timestamps
median_duration, max_duration = median_max_durations[segment_idx]
IndexError: list index out of range faster_whisper version.py """Version information."""
__version__ = "1.1.0rc0" |
This problem is still non-reproducible regardless of all methods provided, it will not be solved without reproduction, someone who has the problem needs to create a colab notebook to reproduce it and if they weren't able to reproduce it on colab then they need to isolate where the problem is caused in their environment, without that there is nothing that can be done |
Hi,
I found a rare condition, with a specific wav file, specific language and prompt, when I try to transcribe with word_timestamps=True, there is a list index out of range error in add_word_timestamps function:
It seems in the median_max_durations list we have less elements than in the segments list.
I'm using large-v3-turbo model with these transcibe settings:
As I see, the median_max_durations is populated from alignments, so something is maybe wrong there? If i change language or prompt, or use another sound file, then there is no issue.
Thank you
The text was updated successfully, but these errors were encountered: