Spaces:
Running
on
Zero
Running
on
Zero
Ignore vocos (for now)
Browse files
app.py
CHANGED
@@ -186,7 +186,7 @@ def text_to_phonemes(text):
|
|
186 |
|
187 |
|
188 |
@spaces.GPU
|
189 |
-
def generate(audio_path, ins, speed, alpha, beta, embedding, steps=200
|
190 |
ref_s = other_tts.compute_style(audio_path)
|
191 |
print(ref_s.size())
|
192 |
s_prev = None
|
@@ -199,7 +199,7 @@ def generate(audio_path, ins, speed, alpha, beta, embedding, steps=200, vocos=Fa
|
|
199 |
synthaud, s_prev = other_tts.long_inference_segment(i, diffusion_steps=steps,
|
200 |
alpha=alpha, beta=beta, is_phonemes=True,
|
201 |
embedding_scale=embedding, prev_s=s_prev, ref_s=ref_s,
|
202 |
-
speed=speed, t=0.8
|
203 |
|
204 |
n_trim = int(len(synthaud) * 0.009)
|
205 |
synthaud[:n_trim] = 0
|
@@ -236,7 +236,6 @@ with gr.Blocks(theme=theme, js=js_func) as clone:
|
|
236 |
interactive=True)
|
237 |
speed = gr.Slider(minimum=0.5, maximum=1.5, value=1, step=0.1, label="Speed of speech",
|
238 |
info="Defaults to 1", interactive=True)
|
239 |
-
vocos = gr.Checkbox(label="Enable Vocos", info="This may break results, as this is currently untested", interactive=True)
|
240 |
with gr.Column(scale=1):
|
241 |
clbtn = gr.Button("Synthesize", variant="primary")
|
242 |
claudio = gr.Audio(interactive=False, label="Synthesized Audio",
|
@@ -245,7 +244,7 @@ with gr.Blocks(theme=theme, js=js_func) as clone:
|
|
245 |
concurrency_limit=15)
|
246 |
|
247 |
gr.Examples(examples=examples,
|
248 |
-
inputs=[voice, inp, speed, alpha, beta, embscale, steps
|
249 |
outputs=[claudio],
|
250 |
fn=generate,
|
251 |
cache_examples=True,)
|
|
|
186 |
|
187 |
|
188 |
@spaces.GPU
|
189 |
+
def generate(audio_path, ins, speed, alpha, beta, embedding, steps=200):
|
190 |
ref_s = other_tts.compute_style(audio_path)
|
191 |
print(ref_s.size())
|
192 |
s_prev = None
|
|
|
199 |
synthaud, s_prev = other_tts.long_inference_segment(i, diffusion_steps=steps,
|
200 |
alpha=alpha, beta=beta, is_phonemes=True,
|
201 |
embedding_scale=embedding, prev_s=s_prev, ref_s=ref_s,
|
202 |
+
speed=speed, t=0.8)
|
203 |
|
204 |
n_trim = int(len(synthaud) * 0.009)
|
205 |
synthaud[:n_trim] = 0
|
|
|
236 |
interactive=True)
|
237 |
speed = gr.Slider(minimum=0.5, maximum=1.5, value=1, step=0.1, label="Speed of speech",
|
238 |
info="Defaults to 1", interactive=True)
|
|
|
239 |
with gr.Column(scale=1):
|
240 |
clbtn = gr.Button("Synthesize", variant="primary")
|
241 |
claudio = gr.Audio(interactive=False, label="Synthesized Audio",
|
|
|
244 |
concurrency_limit=15)
|
245 |
|
246 |
gr.Examples(examples=examples,
|
247 |
+
inputs=[voice, inp, speed, alpha, beta, embscale, steps],
|
248 |
outputs=[claudio],
|
249 |
fn=generate,
|
250 |
cache_examples=True,)
|