Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from inference import infer
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
def vc_fn(sid,random1, input_audio,vc_transform):
|
9 |
|
10 |
return "Success", (22050, audio)
|
@@ -16,12 +12,12 @@ with app:
|
|
16 |
with gr.TabItem("Basic"):
|
17 |
gr.Markdown(value="""
|
18 |
""")
|
19 |
-
sid = gr.Dropdown(label="音色",choices=['speaker0'], value="
|
20 |
-
|
21 |
vc_transform = gr.Number(label="变调(整数,可以正负,半音数量,升高八度就是12)",value=0)
|
22 |
vc_submit = gr.Button("转换", variant="primary")
|
23 |
vc_output1 = gr.Textbox(label="Output Message")
|
24 |
vc_output2 = gr.Audio(label="Output Audio")
|
25 |
-
vc_submit.click(
|
26 |
|
27 |
app.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from inference import infer
|
3 |
|
|
|
|
|
|
|
|
|
4 |
def vc_fn(sid,random1, input_audio,vc_transform):
|
5 |
|
6 |
return "Success", (22050, audio)
|
|
|
12 |
with gr.TabItem("Basic"):
|
13 |
gr.Markdown(value="""
|
14 |
""")
|
15 |
+
sid = gr.Dropdown(label="音色",choices=['speaker0'], value="0")
|
16 |
+
vc_audio = gr.Audio(label="上传音频,建议小于2分钟")
|
17 |
vc_transform = gr.Number(label="变调(整数,可以正负,半音数量,升高八度就是12)",value=0)
|
18 |
vc_submit = gr.Button("转换", variant="primary")
|
19 |
vc_output1 = gr.Textbox(label="Output Message")
|
20 |
vc_output2 = gr.Audio(label="Output Audio")
|
21 |
+
vc_submit.click(infer, [vc_audio,sid, vc_transform], [vc_output1, vc_output2])
|
22 |
|
23 |
app.launch()
|