Skip to content

Commit

Permalink
Merge pull request ufal#70 from tijszwinkels/fix-imports
Browse files Browse the repository at this point in the history
Fix imports
  • Loading branch information
Gldkslfmsd authored Mar 20, 2024
2 parents e17593c + 1610c10 commit 3aee2fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions whisper_online.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class WhisperTimestampedASR(ASRBase):

def load_model(self, modelsize=None, cache_dir=None, model_dir=None):
import whisper
import whisper_timestamped
from whisper_timestamped import transcribe_timestamped
self.transcribe_timestamped = transcribe_timestamped
if model_dir is not None:
Expand Down Expand Up @@ -558,10 +559,8 @@ def asr_factory(args, logfile=sys.stderr):
asr = OpenaiApiASR(lan=args.lan)
else:
if backend == "faster-whisper":
from faster_whisper import FasterWhisperASR
asr_cls = FasterWhisperASR
else:
from whisper_timestamped import WhisperTimestampedASR
asr_cls = WhisperTimestampedASR

# Only for FasterWhisperASR and WhisperTimestampedASR
Expand Down

0 comments on commit 3aee2fb

Please sign in to comment.