14-26AA commited on
Commit
d12002b
1 Parent(s): fedc6c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
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="speaker0")
20
- vc_input3 = gr.Audio(label="上传音频,建议小于2分钟")
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(vc_fn, [sid,random1, vc_input3, vc_transform], [vc_output1, vc_output2])
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()