Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
import server as xvaserver | |
import gradio as gr | |
import requests | |
def predict(input): | |
model_type = 'xVAPitch' | |
line = 'Test' | |
pace = 1.0 | |
save_path = 'test.wav' | |
language = 'en' | |
base_speaker_emb = [] | |
use_sr = 0 | |
use_cleanup = 0 | |
data = { | |
'modelType': model_type, | |
'sequence': line, | |
'pace': pace, | |
'outfile': save_path, | |
'vocoder': 'n/a', | |
'base_lang': language, | |
'base_emb': base_speaker_emb, | |
'useSR': use_sr, | |
'useCleanup': use_cleanup, | |
} | |
requests.post('http://localhost:8008/synthesize', json=data) | |
return '' | |
input_textbox = gr.Textbox( | |
label="Input Text", | |
lines=1, | |
autofocus=True | |
) | |
gradio_app = gr.Interface( | |
predict, | |
input_textbox, | |
outputs="text", | |
title="xVASynth", | |
) | |
if __name__ == "__main__": | |
gradio_app.launch() |