(try to) unload voicefixer if it raises an error during loading voicefixer

This commit is contained in:
mrq 2023-03-09 04:28:14 +00:00
parent dc1902b91c
commit a01eb10960

View File

@ -2069,6 +2069,9 @@ def load_voicefixer(restart=False):
print("Loaded Voicefixer") print("Loaded Voicefixer")
except Exception as e: except Exception as e:
print(f"Error occurred while tring to initialize voicefixer: {e}") print(f"Error occurred while tring to initialize voicefixer: {e}")
if voicefixer:
del voicefixer
voicefixer = None
def unload_voicefixer(): def unload_voicefixer():
global voicefixer global voicefixer