jianfch / stable-ts

Transcription, forced alignment, and audio indexing with OpenAI's Whisper
MIT License
1.59k stars 176 forks source link

Index out of range issue #318

Closed dgoryeo closed 8 months ago

dgoryeo commented 8 months ago

Hi,

What might cause the error "index out of range" ? Can it be a mismatch in my python packages or is it a bug in the code:

result.py", line 844, in duration
    return _round_timestamp(self.segments[-1].end - self.segments[0].start)
IndexError: list index out of range

Thanks.

jianfch commented 8 months ago

This occurs when there is no segments or words the result. Should be fixed after 00ad4b45d314eadedc59b2ede7ab034ef14a5131.