fix filename generation which didn't work and overwrote existing files #341
|
@ -1099,7 +1099,7 @@ def generate_tortoise(**kwargs):
|
||||||
for i, file in enumerate(os.listdir(outdir)):
|
for i, file in enumerate(os.listdir(outdir)):
|
||||||
filename = os.path.basename(file)
|
filename = os.path.basename(file)
|
||||||
extension = os.path.splitext(filename)[-1][1:]
|
extension = os.path.splitext(filename)[-1][1:]
|
||||||
if extension != ".json" and extension != ".wav":
|
if extension != "json" and extension != "wav":
|
||||||
continue
|
continue
|
||||||
match = re.findall(rf"^{voice}_(\d+)(?:.+?)?{extension}$", filename)
|
match = re.findall(rf"^{voice}_(\d+)(?:.+?)?{extension}$", filename)
|
||||||
if match and len(match) > 0:
|
if match and len(match) > 0:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user