From 4a2ee64e714dba647e485f6723f9045f32e7c89d Mon Sep 17 00:00:00 2001 From: McCloudS <64094529+McCloudS@users.noreply.github.com> Date: Sat, 13 Jul 2024 14:11:59 -0600 Subject: [PATCH] Close the audio_data file handle --- subgen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subgen.py b/subgen.py index 6f447bc..1516df8 100644 --- a/subgen.py +++ b/subgen.py @@ -454,6 +454,7 @@ def asr( except Exception as e: logging.info(f"Error processing or transcribing Bazarr {audio_file.filename}: {e}") finally: + audio_file.close() task_queue.task_done() delete_model() if result: @@ -492,6 +493,7 @@ def detect_language( logging.info(f"Error processing or transcribing Bazarr {audio_file.filename}: {e}") finally: + audio_file.close() task_queue.task_done() delete_model()