negative timestamp #424
-
|
I occasionally get an AssertionError about negative timestamp from the result. Traceback (most recent call last): The segment causing this issue looks like this (see "start" value below): |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Interesting issue. If you can share the audio, it would be easier to figure out where it's wrong. |
Beta Was this translation helpful? Give feedback.
-
|
I get the same problem though it is very rare. As far as I understand, Whisper may output a non-timestamp token after the Line 198 in 9f70a35 A possible solution would be to suppress generating non-timestamp tokens as a first generated token. |
Beta Was this translation helpful? Give feedback.
I get the same problem though it is very rare. As far as I understand, Whisper may output a non-timestamp token after the
<transcribe>token even if it is not in thewithout_timestampsmode. But, the transcribe function assumes that the first decoded token (sliced_tokens[0]) is always a timestamp token, and as a result,start_timestamp_positioncould be negative if is not the case.See around this line:
whisper/whisper/transcribe.py
Line 198 in 9f70a35
A possible solution would be to suppress generating non-timestamp tokens as a first generated token.