File size: 866 Bytes
bd4280b
5ee7d48
23689bd
5ee7d48
 
 
 
 
 
 
 
 
 
 
23689bd
d12002b
5ee7d48
 
 
 
23689bd
5ee7d48
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr
from inference import infer
import numpy as np
def vc_fn(sid,random1, input_audio,vc_transform):

    return "Success", (22050, audio)


app = gr.Blocks()
with app:
    with gr.Tabs():
        with gr.TabItem("Basic"):
            gr.Markdown(value="""
            """)
            sid = gr.Dropdown(label="音色",choices=np.arrange(175), value=np.arrange(175))
            vc_audio = gr.Audio(label="上传音频,建议小于2分钟")
            vc_transform = gr.Number(label="变调(整数,可以正负,半音数量,升高八度就是12)",value=0)
            vc_submit = gr.Button("转换", variant="primary")
            vc_output1 = gr.Textbox(label="Output Message")
            vc_output2 = gr.Audio(label="Output Audio")
        vc_submit.click(infer, [vc_audio,sid, vc_transform], [vc_output1, vc_output2])

    app.launch()