File size: 618 Bytes
af41cc5
 
1e04ba6
af41cc5
5af8374
 
 
465145b
 
9898d4b
af41cc5
46b8fc3
af41cc5
 
0e4103d
496d57a
af41cc5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
import os
import shlex

os.system('wget https://www.dropbox.com/s/luro5o8kjotkn70/synpretrained.pt')
os.system('wget https://www.dropbox.com/s/dv0ymnlqillecfw/encpretrained.pt')
os.system('wget https://www.dropbox.com/s/aiym2qfv7087bsc/vocpretrained.pt')
os.system('ls')


def inference(audio, text):
    os.system("python demo_cli.py --no_sound --cpu --audio_path "+audio.name+" --text "+shlex.quote(text.strip()))
    return 'demo_output_1.wav'

iface = gr.Interface(inference, inputs=[gr.inputs.Audio(type="file"),"text"], outputs=gr.outputs.Audio(type="file"),enable_queue=True)

iface.launch()