diff --git a/whisper/mlx_whisper/transcribe.py b/whisper/mlx_whisper/transcribe.py index bced16a58..3e9a834cc 100644 --- a/whisper/mlx_whisper/transcribe.py +++ b/whisper/mlx_whisper/transcribe.py @@ -19,7 +19,6 @@ ) from .decoding import DecodingOptions, DecodingResult from .load_models import load_model -from .timing import add_word_timestamps from .tokenizer import LANGUAGES, get_tokenizer @@ -412,6 +411,8 @@ def next_words_segment(segments: List[dict]) -> Optional[dict]: seek += segment_size if word_timestamps: + from .timing import add_word_timestamps + add_word_timestamps( segments=current_segments, model=model,