mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 17:31:18 +08:00
Fix timestamp extraction bug in transcribe function
This commit is contained in:
parent
0bf5d0e3bc
commit
6cbc029450
@ -300,7 +300,7 @@ def transcribe(
|
|||||||
seek += last_timestamp_pos * input_stride
|
seek += last_timestamp_pos * input_stride
|
||||||
else:
|
else:
|
||||||
duration = segment_duration
|
duration = segment_duration
|
||||||
timestamps = tokens[timestamp_tokens.nonzero().flatten()]
|
timestamps = tokens[timestamp_tokens.nonzero()[0]]
|
||||||
if (
|
if (
|
||||||
len(timestamps) > 0
|
len(timestamps) > 0
|
||||||
and timestamps[-1].item() != tokenizer.timestamp_begin
|
and timestamps[-1].item() != tokenizer.timestamp_begin
|
||||||
|
Loading…
Reference in New Issue
Block a user