Add some logging around warmup
This commit is contained in:
parent
cc56fdd931
commit
23a018d341
1 changed files with 2 additions and 0 deletions
|
|
@ -75,11 +75,13 @@ online = OnlineASRProcessor(asr,tokenizer,buffer_trimming=(args.buffer_trimming,
|
||||||
demo_audio_path = "cs-maji-2.16k.wav"
|
demo_audio_path = "cs-maji-2.16k.wav"
|
||||||
if os.path.exists(demo_audio_path):
|
if os.path.exists(demo_audio_path):
|
||||||
# load the audio into the LRU cache before we start the timer
|
# load the audio into the LRU cache before we start the timer
|
||||||
|
logging.debug(f"Warming up on {demo_audio_path}")
|
||||||
a = load_audio_chunk(demo_audio_path,0,1)
|
a = load_audio_chunk(demo_audio_path,0,1)
|
||||||
|
|
||||||
# TODO: it should be tested whether it's meaningful
|
# TODO: it should be tested whether it's meaningful
|
||||||
# warm up the ASR, because the very first transcribe takes much more time than the other
|
# warm up the ASR, because the very first transcribe takes much more time than the other
|
||||||
asr.transcribe(a)
|
asr.transcribe(a)
|
||||||
|
logging.debug("Whisper is warmed up")
|
||||||
else:
|
else:
|
||||||
logging.debug("Whisper is not warmed up")
|
logging.debug("Whisper is not warmed up")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue