Spaces:
Runtime error
Runtime error
pengdaqian
commited on
Commit
·
908daa0
1
Parent(s):
962c594
fix
Browse files
app.py
CHANGED
@@ -186,7 +186,7 @@ def svc_change(argswave, argsspk):
|
|
186 |
|
187 |
|
188 |
@log_execution_time
|
189 |
-
def svc_main(sid, input_audio):
|
190 |
if input_audio is None:
|
191 |
return "You need to upload an audio", None
|
192 |
sampling_rate, audio = input_audio
|
@@ -293,11 +293,6 @@ def auto_search(name):
|
|
293 |
def main():
|
294 |
app = gr.Blocks()
|
295 |
|
296 |
-
sound1 = soundfile.read('wavs/李荣浩不将就.wav', dtype='float32')
|
297 |
-
sound2 = soundfile.read('wavs/周杰伦告白气球.wav', dtype='float32')
|
298 |
-
sound3 = soundfile.read('wavs/薛之谦天后.wav', dtype='float32')
|
299 |
-
|
300 |
-
|
301 |
try:
|
302 |
with app:
|
303 |
title = "Singer Voice Clone 0.1 Demo"
|
@@ -354,9 +349,9 @@ def main():
|
|
354 |
)
|
355 |
|
356 |
examples = [
|
357 |
-
['李荣浩不将就', '
|
358 |
-
['周杰伦告白气球', '
|
359 |
-
['薛之谦天后', '
|
360 |
]
|
361 |
with gr.Group():
|
362 |
with gr.Box():
|
@@ -375,17 +370,18 @@ def main():
|
|
375 |
vc_output1 = gr.Textbox(label="Run Status")
|
376 |
vc_output2 = gr.Audio(label="Result Audio")
|
377 |
|
|
|
|
|
|
|
|
|
378 |
gr.Examples(
|
379 |
examples=examples,
|
380 |
-
inputs=[vc_input2,
|
381 |
outputs=[vc_output1, vc_output2],
|
382 |
fn=svc_main,
|
383 |
cache_examples=True,
|
384 |
)
|
385 |
|
386 |
-
vc_search.click(auto_search, [vc_input2], [vc_output1, vc_input3])
|
387 |
-
vc_submit.click(svc_main, [sid, vc_input3], [vc_output1, vc_output2])
|
388 |
-
|
389 |
app.launch(server_port=6006)
|
390 |
except KeyboardInterrupt:
|
391 |
app.close()
|
|
|
186 |
|
187 |
|
188 |
@log_execution_time
|
189 |
+
def svc_main(name, sid, input_audio):
|
190 |
if input_audio is None:
|
191 |
return "You need to upload an audio", None
|
192 |
sampling_rate, audio = input_audio
|
|
|
293 |
def main():
|
294 |
app = gr.Blocks()
|
295 |
|
|
|
|
|
|
|
|
|
|
|
296 |
try:
|
297 |
with app:
|
298 |
title = "Singer Voice Clone 0.1 Demo"
|
|
|
349 |
)
|
350 |
|
351 |
examples = [
|
352 |
+
['李荣浩不将就', '47', 'wavs/李荣浩不将就.mp3'],
|
353 |
+
['周杰伦告白气球', '47', 'wavs/李荣浩不将就.mp3'],
|
354 |
+
['薛之谦天后', '47', 'wavs/李荣浩不将就.mp3'],
|
355 |
]
|
356 |
with gr.Group():
|
357 |
with gr.Box():
|
|
|
370 |
vc_output1 = gr.Textbox(label="Run Status")
|
371 |
vc_output2 = gr.Audio(label="Result Audio")
|
372 |
|
373 |
+
vc_search.click(auto_search, [vc_input2], [vc_output1, vc_input3])
|
374 |
+
vc_submit.click(svc_main, [vc_input2, sid, vc_input3], [vc_output1, vc_output2])
|
375 |
+
|
376 |
+
with gr.Row():
|
377 |
gr.Examples(
|
378 |
examples=examples,
|
379 |
+
inputs=[vc_input2, sid, vc_input3],
|
380 |
outputs=[vc_output1, vc_output2],
|
381 |
fn=svc_main,
|
382 |
cache_examples=True,
|
383 |
)
|
384 |
|
|
|
|
|
|
|
385 |
app.launch(server_port=6006)
|
386 |
except KeyboardInterrupt:
|
387 |
app.close()
|