Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ for root, dirs, files in os.walk(local_dir):
|
|
21 |
result_dir = "results"
|
22 |
|
23 |
@spaces.GPU
|
24 |
-
def predict(prompt, upload_reference_audio, microphone_reference_audio, reference_audio_type
|
25 |
global result_dir
|
26 |
output_file_path = os.path.join(result_dir, 'output.wav')
|
27 |
if reference_audio_type == 'upload':
|
@@ -84,7 +84,7 @@ def main():
|
|
84 |
)
|
85 |
tts_button = gr.Button("Generate audio", elem_id="kdtalker_audio_generate", variant="primary")
|
86 |
tts_driven_audio = gr.Audio(label="Synthesised Audio", type="filepath")
|
87 |
-
tts_button.click(fn=predict, inputs=[input_text, upload_reference_audio, microphone_reference_audio, reference_audio_type
|
88 |
tts_button.click(lambda: "tts", outputs=driven_audio_type)
|
89 |
|
90 |
with gr.Column(variant="panel"):
|
|
|
21 |
result_dir = "results"
|
22 |
|
23 |
@spaces.GPU
|
24 |
+
def predict(prompt, upload_reference_audio, microphone_reference_audio, reference_audio_type):
|
25 |
global result_dir
|
26 |
output_file_path = os.path.join(result_dir, 'output.wav')
|
27 |
if reference_audio_type == 'upload':
|
|
|
84 |
)
|
85 |
tts_button = gr.Button("Generate audio", elem_id="kdtalker_audio_generate", variant="primary")
|
86 |
tts_driven_audio = gr.Audio(label="Synthesised Audio", type="filepath")
|
87 |
+
tts_button.click(fn=predict, inputs=[input_text, upload_reference_audio, microphone_reference_audio, reference_audio_type], outputs=[tts_driven_audio])
|
88 |
tts_button.click(lambda: "tts", outputs=driven_audio_type)
|
89 |
|
90 |
with gr.Column(variant="panel"):
|