File size: 852 Bytes
bd4280b
5ee7d48
23689bd
5ee7d48
bf59450
 
5ee7d48
 
 
 
 
 
 
0dd1aa5
d12002b
bf59450
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
import gradio as gr
from inference import infer
import numpy as np

spkdict=np.arange(175).tolist()
spkdict=['speaker'+str(spk) for spk in spkdict]

app = gr.Blocks()
with app:
    with gr.Tabs():
        with gr.TabItem("Basic"):
            gr.Markdown(value="""
            """)
            sid = gr.Dropdown(label="音色",choices=np.arange(175), value=0)
            vc_audio = gr.Audio(label="上传音频,建议小于2分钟")
            vc_transform = gr.Number(label="变调(整数,可以正负,半音数量,升高八度就是12)",value='speaker0')
            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()