14-26AA commited on
Commit
23689bd
1 Parent(s): 040b6e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
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,12 +12,12 @@ with app:
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,int(sid), vc_transform], [vc_output1, vc_output2])
22
 
23
  app.launch()
 
1
  import gradio as gr
2
  from inference import infer
3
+ import numpy as np
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=np.arrange(175), value=np.arrange(175))
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()