whisper
whisper copied to clipboard
Prevent infinite loop for out-of-bound timestamps in clip_timestamps
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.
It looks like whisper-test has gotten stuck for some reason.