forked from mrq/ai-voice-cloning
fixed the overwrite regression for bark and vall-e backends too
This commit is contained in:
parent
f5fab33e9c
commit
533b73e083
|
@ -432,7 +432,7 @@ def generate_bark(**kwargs):
|
|||
for i, file in enumerate(os.listdir(outdir)):
|
||||
filename = os.path.basename(file)
|
||||
extension = os.path.splitext(filename)[-1][1:]
|
||||
if extension != ".json" and extension != ".wav":
|
||||
if extension != "json" and extension != "wav":
|
||||
continue
|
||||
match = re.findall(rf"^{cleanup_voice_name(voice)}_(\d+)(?:.+?)?{extension}$", filename)
|
||||
if match and len(match) > 0:
|
||||
|
@ -734,7 +734,7 @@ def generate_valle(**kwargs):
|
|||
for i, file in enumerate(os.listdir(outdir)):
|
||||
filename = os.path.basename(file)
|
||||
extension = os.path.splitext(filename)[-1][1:]
|
||||
if extension != ".json" and extension != ".wav":
|
||||
if extension != "json" and extension != "wav":
|
||||
continue
|
||||
match = re.findall(rf"^{voice}_(\d+)(?:.+?)?{extension}$", filename)
|
||||
if match and len(match) > 0:
|
||||
|
|
Loading…
Reference in New Issue
Block a user