whisper icon indicating copy to clipboard operation
whisper copied to clipboard

Prevent infinite loop for out-of-bound timestamps in clip_timestamps

Open jbaudanza opened this issue 1 year ago • 1 comments

I'm using the output of get_speech_timestamps in Silero VAD to produce values for clip_timestamps.

The VAD produces an end timestamp that is one-sample beyond the last found voice sample. I was converting these timestamps into seconds and passing them directly into clip_timestamps.

The problem is sometimes the end timestamp would be one sample past the end of the file. In this case, whisper would go into an infinite loop, trying to run inference on segment_size of 0.

jbaudanza avatar Feb 07 '24 07:02 jbaudanza

It looks like whisper-test has gotten stuck for some reason.

ryanheise avatar Mar 31 '24 02:03 ryanheise