Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
generate whitenoise
Browse files
app.py
CHANGED
|
@@ -1,7 +1,29 @@
|
|
| 1 |
import server as xvaserver
|
| 2 |
import gradio as gr
|
|
|
|
| 3 |
|
| 4 |
def predict(input):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
return ''
|
| 6 |
|
| 7 |
input_textbox = gr.Textbox(
|
|
|
|
| 1 |
import server as xvaserver
|
| 2 |
import gradio as gr
|
| 3 |
+
import requests
|
| 4 |
|
| 5 |
def predict(input):
|
| 6 |
+
model_type = 'xVAPitch'
|
| 7 |
+
line = 'Test'
|
| 8 |
+
pace = 1.0
|
| 9 |
+
save_path = 'test.wav'
|
| 10 |
+
language = 'en'
|
| 11 |
+
base_speaker_emb = []
|
| 12 |
+
use_sr = 0
|
| 13 |
+
use_cleanup = 0
|
| 14 |
+
|
| 15 |
+
data = {
|
| 16 |
+
'modelType': model_type,
|
| 17 |
+
'sequence': line,
|
| 18 |
+
'pace': pace,
|
| 19 |
+
'outfile': save_path,
|
| 20 |
+
'vocoder': 'n/a',
|
| 21 |
+
'base_lang': language,
|
| 22 |
+
'base_emb': base_speaker_emb,
|
| 23 |
+
'useSR': use_sr,
|
| 24 |
+
'useCleanup': use_cleanup,
|
| 25 |
+
}
|
| 26 |
+
requests.post('http://localhost:8008/synthesize', json=data)
|
| 27 |
return ''
|
| 28 |
|
| 29 |
input_textbox = gr.Textbox(
|
server.py
CHANGED
|
@@ -5,7 +5,8 @@ import multiprocessing
|
|
| 5 |
|
| 6 |
torch_dml_device = None
|
| 7 |
|
| 8 |
-
if __name__ == '__main__':
|
|
|
|
| 9 |
server = None
|
| 10 |
multiprocessing.freeze_support()
|
| 11 |
|
|
|
|
| 5 |
|
| 6 |
torch_dml_device = None
|
| 7 |
|
| 8 |
+
# if __name__ == '__main__':
|
| 9 |
+
if True:
|
| 10 |
server = None
|
| 11 |
multiprocessing.freeze_support()
|
| 12 |
|