Close the audio_data file handle
This commit is contained in:
@@ -454,6 +454,7 @@ def asr(
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.info(f"Error processing or transcribing Bazarr {audio_file.filename}: {e}")
|
logging.info(f"Error processing or transcribing Bazarr {audio_file.filename}: {e}")
|
||||||
finally:
|
finally:
|
||||||
|
audio_file.close()
|
||||||
task_queue.task_done()
|
task_queue.task_done()
|
||||||
delete_model()
|
delete_model()
|
||||||
if result:
|
if result:
|
||||||
@@ -492,6 +493,7 @@ def detect_language(
|
|||||||
logging.info(f"Error processing or transcribing Bazarr {audio_file.filename}: {e}")
|
logging.info(f"Error processing or transcribing Bazarr {audio_file.filename}: {e}")
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
|
audio_file.close()
|
||||||
task_queue.task_done()
|
task_queue.task_done()
|
||||||
delete_model()
|
delete_model()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user