lazy wrap around the voicefixer block because sometimes it just an heros itself despite having a specific block to load it beforehand

This commit is contained in:
mrq 2023-03-08 04:12:22 +00:00
parent 83b5125854
commit f1788a5639

View File

@ -410,6 +410,7 @@ def generate(
progress(0, "Loading voicefix...") progress(0, "Loading voicefix...")
load_voicefixer() load_voicefixer()
try:
fixed_cache = {} fixed_cache = {}
for name in progress.tqdm(audio_cache, desc="Running voicefix..."): for name in progress.tqdm(audio_cache, desc="Running voicefix..."):
del audio_cache[name]['audio'] del audio_cache[name]['audio']
@ -433,6 +434,9 @@ def generate(
for name in fixed_cache: for name in fixed_cache:
audio_cache[name] = fixed_cache[name] audio_cache[name] = fixed_cache[name]
except Exception as e:
print(e)
print("\nFailed to run Voicefixer")
for name in audio_cache: for name in audio_cache:
if 'output' not in audio_cache[name] or not audio_cache[name]['output']: if 'output' not in audio_cache[name] or not audio_cache[name]['output']: