regularfry commited on
Commit
23a018d
·
1 Parent(s): cc56fdd

Add some logging around warmup

Browse files
Files changed (1) hide show
  1. whisper_online_server.py +2 -0
whisper_online_server.py CHANGED
@@ -75,11 +75,13 @@ online = OnlineASRProcessor(asr,tokenizer,buffer_trimming=(args.buffer_trimming,
75
  demo_audio_path = "cs-maji-2.16k.wav"
76
  if os.path.exists(demo_audio_path):
77
  # load the audio into the LRU cache before we start the timer
 
78
  a = load_audio_chunk(demo_audio_path,0,1)
79
 
80
  # TODO: it should be tested whether it's meaningful
81
  # warm up the ASR, because the very first transcribe takes much more time than the other
82
  asr.transcribe(a)
 
83
  else:
84
  logging.debug("Whisper is not warmed up")
85
 
 
75
  demo_audio_path = "cs-maji-2.16k.wav"
76
  if os.path.exists(demo_audio_path):
77
  # load the audio into the LRU cache before we start the timer
78
+ logging.debug(f"Warming up on {demo_audio_path}")
79
  a = load_audio_chunk(demo_audio_path,0,1)
80
 
81
  # TODO: it should be tested whether it's meaningful
82
  # warm up the ASR, because the very first transcribe takes much more time than the other
83
  asr.transcribe(a)
84
+ logging.debug("Whisper is warmed up")
85
  else:
86
  logging.debug("Whisper is not warmed up")
87