From a01eb10960c352584eb6d0a0d9adb4c28b163a2e Mon Sep 17 00:00:00 2001 From: mrq Date: Thu, 9 Mar 2023 04:28:14 +0000 Subject: [PATCH] (try to) unload voicefixer if it raises an error during loading voicefixer --- src/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils.py b/src/utils.py index 5f21d04..665ac56 100755 --- a/src/utils.py +++ b/src/utils.py @@ -2069,6 +2069,9 @@ def load_voicefixer(restart=False): print("Loaded Voicefixer") except Exception as e: print(f"Error occurred while tring to initialize voicefixer: {e}") + if voicefixer: + del voicefixer + voicefixer = None def unload_voicefixer(): global voicefixer