Spaces:
Sleeping
Sleeping
Initial Draft
Browse files
voice.py
CHANGED
@@ -16,10 +16,10 @@ ui_input_voice_presenter=gr.Dropdown(
|
|
16 |
ui_input_filename=gr.Textbox(label="Input WAV Filename")
|
17 |
ui_input_text=gr.Textbox(lines=22,label="Input Text")
|
18 |
|
19 |
-
filePath = os.path.dirname(__file__)
|
20 |
|
21 |
-
if os.path.exists(
|
22 |
-
ui_output=gr.Audio(label="Output",value=
|
23 |
else:
|
24 |
ui_output=gr.Audio(label="Output")
|
25 |
|
@@ -43,7 +43,7 @@ def submit(voice_presenter, filename, input_text):
|
|
43 |
|
44 |
print("Generation of Voice completed")
|
45 |
|
46 |
-
return
|
47 |
|
48 |
############################
|
49 |
###### Main Program ########
|
|
|
16 |
ui_input_filename=gr.Textbox(label="Input WAV Filename")
|
17 |
ui_input_text=gr.Textbox(lines=22,label="Input Text")
|
18 |
|
19 |
+
filePath = os.path.dirname(__file__)+"/"
|
20 |
|
21 |
+
if os.path.exists(filePath+"sample.wav"):
|
22 |
+
ui_output=gr.Audio(label="Output",value=filePath+"sample.wav")
|
23 |
else:
|
24 |
ui_output=gr.Audio(label="Output")
|
25 |
|
|
|
43 |
|
44 |
print("Generation of Voice completed")
|
45 |
|
46 |
+
return filePath+"sample.wav"
|
47 |
|
48 |
############################
|
49 |
###### Main Program ########
|