Spaces:
Sleeping
Sleeping
update app
Browse files
app.py
CHANGED
@@ -51,12 +51,8 @@ def inference(
|
|
51 |
voice_b,
|
52 |
preset,
|
53 |
seed,
|
54 |
-
regenerate,
|
55 |
split_by_newline,
|
56 |
):
|
57 |
-
if regenerate.strip() == "":
|
58 |
-
regenerate = None
|
59 |
-
name = "generated.wav"
|
60 |
if text is None or text.strip() == "":
|
61 |
with open(script.name) as f:
|
62 |
text = f.read()
|
@@ -68,9 +64,6 @@ def inference(
|
|
68 |
else:
|
69 |
texts = split_and_recombine_text(text)
|
70 |
|
71 |
-
if regenerate is not None:
|
72 |
-
regenerate = list(map(int, regenerate.split()))
|
73 |
-
|
74 |
voices = [voice]
|
75 |
if voice_b != "disabled":
|
76 |
voices.append(voice_b)
|
@@ -117,9 +110,7 @@ def main():
|
|
117 |
label="Text (Provide either text, or upload a newline separated text file below):",
|
118 |
)
|
119 |
script = gr.File(label="Upload a text file")
|
120 |
-
|
121 |
-
lines=1, label="Name of the output file / folder to store intermediate results:"
|
122 |
-
)
|
123 |
preset = gr.Radio(
|
124 |
["ultra_fast", "fast", "standard", "high_quality"],
|
125 |
value="fast",
|
@@ -136,10 +127,6 @@ def main():
|
|
136 |
type="value",
|
137 |
)
|
138 |
seed = gr.Number(value=0, precision=0, label="Seed (for reproducibility):")
|
139 |
-
regenerate = gr.Textbox(
|
140 |
-
lines=1,
|
141 |
-
label="Comma-separated indices of clips to regenerate [starting from 1]",
|
142 |
-
)
|
143 |
|
144 |
split_by_newline = gr.Radio(
|
145 |
["Yes", "No"],
|
@@ -160,7 +147,6 @@ def main():
|
|
160 |
voice_b,
|
161 |
preset,
|
162 |
seed,
|
163 |
-
regenerate,
|
164 |
split_by_newline,
|
165 |
],
|
166 |
outputs=[output_audio, output_text],
|
|
|
51 |
voice_b,
|
52 |
preset,
|
53 |
seed,
|
|
|
54 |
split_by_newline,
|
55 |
):
|
|
|
|
|
|
|
56 |
if text is None or text.strip() == "":
|
57 |
with open(script.name) as f:
|
58 |
text = f.read()
|
|
|
64 |
else:
|
65 |
texts = split_and_recombine_text(text)
|
66 |
|
|
|
|
|
|
|
67 |
voices = [voice]
|
68 |
if voice_b != "disabled":
|
69 |
voices.append(voice_b)
|
|
|
110 |
label="Text (Provide either text, or upload a newline separated text file below):",
|
111 |
)
|
112 |
script = gr.File(label="Upload a text file")
|
113 |
+
|
|
|
|
|
114 |
preset = gr.Radio(
|
115 |
["ultra_fast", "fast", "standard", "high_quality"],
|
116 |
value="fast",
|
|
|
127 |
type="value",
|
128 |
)
|
129 |
seed = gr.Number(value=0, precision=0, label="Seed (for reproducibility):")
|
|
|
|
|
|
|
|
|
130 |
|
131 |
split_by_newline = gr.Radio(
|
132 |
["Yes", "No"],
|
|
|
147 |
voice_b,
|
148 |
preset,
|
149 |
seed,
|
|
|
150 |
split_by_newline,
|
151 |
],
|
152 |
outputs=[output_audio, output_text],
|