Vaibhav Srivastav commited on
Commit
ee48acc
1 Parent(s): 0f6c489
Files changed (1) hide show
  1. app.py +12 -9
app.py CHANGED
@@ -6,16 +6,19 @@ tts.to("cuda")
6
 
7
 
8
  def predict(prompt, language, audio_file_pth, agree):
9
- tts.tts_to_file(
10
- text=prompt,
11
- file_path="output.wav",
12
- speaker_wav=audio_file_pth,
13
- language=language,
14
- )
 
15
 
16
- return gr.make_waveform(
17
- audio="output.wav",
18
- ), gr.Audio(value="output.wav")
 
 
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"