This commit is contained in:
Yuta Hayashibe 2022-09-23 20:32:37 +09:00
parent 678aa92365
commit 8b5615cefa

View file

@ -160,7 +160,7 @@ class WhisperStreamingTranscriber:
tokens[last_slice - 1].item() - self.tokenizer.timestamp_begin
)
self.buffer_tokens.extend(tokens[: last_slice + 1].tolist())
self.timestamp += last_timestamp_position * self.input_stride
self.timestamp += last_timestamp_position * self.time_precision
else:
duration = segment_duration
timestamps = tokens[timestamp_tokens.nonzero().flatten()]