Spaces:
Build error
Build error
import gradio as gr | |
from inference import infer | |
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=['speaker0'], value="0") | |
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() |