Attempting to make sure all log lines get flushed, and fixed a variable name
This commit is contained in:
parent
f634fd4b1e
commit
2da06f84a7
@ -40,7 +40,7 @@ def _do_whisper_transcribe(inpath,
|
||||
end = time.time()
|
||||
if language is None:
|
||||
out_language = result['language']
|
||||
logger.info(f"Detected language '{read_language}' in {inpath}.")
|
||||
logger.info(f"Detected language '{out_language}' in {inpath}.")
|
||||
else:
|
||||
out_language = language
|
||||
vttWriter = whisper.utils.WriteVTT(str(outpath.parent))
|
||||
@ -57,6 +57,7 @@ def _do_whisper_transcribe(inpath,
|
||||
elapsed = time.strftime('%H:%M:%S', time.gmtime(end - start))
|
||||
logger.info('Finished whisper transcription job '
|
||||
f'for {inpath} in {elapsed}.')
|
||||
[handler.flush() for handler in logger.handlers]
|
||||
return (outpath, out_language)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user