mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 01:17:28 +08:00
fix looping in whisper (#1273)
This commit is contained in:
parent
5865899c81
commit
bded1a8fcd
@ -195,6 +195,8 @@ def transcribe(
|
||||
seek_points.append(0)
|
||||
if len(seek_points) % 2 == 1:
|
||||
seek_points.append(content_frames)
|
||||
else:
|
||||
seek_points[-1] = min(content_frames, seek_points[-1])
|
||||
seek_clips: List[Tuple[int, int]] = list(zip(seek_points[::2], seek_points[1::2]))
|
||||
|
||||
punctuation = "\"'“¿([{-\"'.。,,!!??::”)]}、"
|
||||
|
Loading…
Reference in New Issue
Block a user