Spaces:
Running
Running
Initial Draft
Browse files
voice.py
CHANGED
@@ -15,7 +15,13 @@ ui_input_voice_presenter=gr.Dropdown(
|
|
15 |
)
|
16 |
ui_input_filename=gr.Textbox(label="Input WAV Filename")
|
17 |
ui_input_text=gr.Textbox(lines=22,label="Input Text")
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
# -- Model Variables
|
21 |
processor = AutoProcessor.from_pretrained("suno/bark")
|
|
|
15 |
)
|
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__))+"/sample.wav"
|
20 |
+
|
21 |
+
if os.path.exists(file_path):
|
22 |
+
ui_output=gr.Audio(label="Output",value=os.path.join(os.path.dirname(__file__))+"/sample.wav")
|
23 |
+
else:
|
24 |
+
ui_output=gr.Audio(label="Output")
|
25 |
|
26 |
# -- Model Variables
|
27 |
processor = AutoProcessor.from_pretrained("suno/bark")
|