Add error handing to emotion RVC mode

This commit is contained in:
Cohee
2024-08-28 20:43:20 +03:00
parent 3d40acaacc
commit edee9dcd85

View File

@@ -180,6 +180,7 @@ def rvc_process_audio():
# HACK: emotion mode EXPERIMENTAL
if classification_mode:
try:
print(DEBUG_PREFIX,"EXPERIMENT MODE: emotions")
print("> Searching overide code ($emotion$)")
@@ -210,6 +211,10 @@ def rvc_process_audio():
if not os.path.exists(index_path):
print(" > WARNING emotion model index not found:",index_path)
index_path = None
except Exception as e:
print(f" > ERROR: emotion mode failed {str(e)}")
model_path = None
index_path = None
if model_path is None:
print(DEBUG_PREFIX, "Check for pth file in ", folder_path)