Spaces:
Sleeping
Sleeping
Vaibhav Srivastav
commited on
Commit
•
ee48acc
1
Parent(s):
0f6c489
up
Browse files
app.py
CHANGED
@@ -6,16 +6,19 @@ tts.to("cuda")
|
|
6 |
|
7 |
|
8 |
def predict(prompt, language, audio_file_pth, agree):
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
19 |
|
20 |
|
21 |
title = "Coqui🐸 XTTS"
|
|
|
6 |
|
7 |
|
8 |
def predict(prompt, language, audio_file_pth, agree):
|
9 |
+
if agree == True:
|
10 |
+
tts.tts_to_file(
|
11 |
+
text=prompt,
|
12 |
+
file_path="output.wav",
|
13 |
+
speaker_wav=audio_file_pth,
|
14 |
+
language=language,
|
15 |
+
)
|
16 |
|
17 |
+
return gr.make_waveform(
|
18 |
+
audio="output.wav",
|
19 |
+
), gr.Audio(value="output.wav")
|
20 |
+
else:
|
21 |
+
gr.Warning("Please accept the Terms & Condition!")
|
22 |
|
23 |
|
24 |
title = "Coqui🐸 XTTS"
|