forked from mrq/tortoise-tts
Numbering predicates on input_#.json files instead of "number of wavs"
This commit is contained in:
parent
8641cc9906
commit
340a89f883
8
webui.py
8
webui.py
|
@ -144,18 +144,18 @@ def generate(
|
||||||
|
|
||||||
idx = 0
|
idx = 0
|
||||||
for i, file in enumerate(os.listdir(outdir)):
|
for i, file in enumerate(os.listdir(outdir)):
|
||||||
if file[-4:] == ".wav":
|
if file[-5:] == ".json":
|
||||||
idx = idx + 1
|
idx = idx + 1
|
||||||
|
|
||||||
def get_name(line=0, candidate=0, combined=False):
|
def get_name(line=0, candidate=0, combined=False):
|
||||||
|
if combined:
|
||||||
|
return f"{idx}_combined"
|
||||||
|
|
||||||
name = f"{idx}"
|
name = f"{idx}"
|
||||||
if len(texts) > 1:
|
if len(texts) > 1:
|
||||||
name = f"{name}_{line}"
|
name = f"{name}_{line}"
|
||||||
if candidates > 1:
|
if candidates > 1:
|
||||||
name = f"{name}_{candidate}"
|
name = f"{name}_{candidate}"
|
||||||
|
|
||||||
if combined:
|
|
||||||
return f"{idx}_combined"
|
|
||||||
return name
|
return name
|
||||||
|
|
||||||
for line, cut_text in enumerate(texts):
|
for line, cut_text in enumerate(texts):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user