Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,21 +9,15 @@ device = "cuda"
|
|
9 |
|
10 |
tts = TTS("tts_models/multilingual/multi-dataset/xtts_bill_spa").to(device)
|
11 |
|
12 |
-
@spaces.GPU(
|
13 |
-
def
|
14 |
-
|
15 |
-
|
16 |
-
config,
|
17 |
-
speaker_wav="/guide_recording/guide.wav",
|
18 |
-
gpt_cond_len=3,
|
19 |
-
language="es",
|
20 |
-
)
|
21 |
-
return outputs
|
22 |
|
23 |
demo = gr.Interface(
|
24 |
-
fn=
|
25 |
-
inputs=[
|
26 |
-
outputs=
|
27 |
)
|
28 |
|
29 |
demo.launch()
|
|
|
9 |
|
10 |
tts = TTS("tts_models/multilingual/multi-dataset/xtts_bill_spa").to(device)
|
11 |
|
12 |
+
@spaces.GPU(enable_queue=True)
|
13 |
+
def clone(text, audio):
|
14 |
+
tts.tts_to_file(text=text, speaker_wav=audio, language="en", file_path="./output.wav")
|
15 |
+
return "./output.wav"
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
demo = gr.Interface(
|
18 |
+
fn=clone,
|
19 |
+
inputs=[gr.Textbox(label='Frase a generar'), gr.Audio(type='filepath', label='Voz de referencia')],
|
20 |
+
outputs=gr.Audio(type='filepath')
|
21 |
)
|
22 |
|
23 |
demo.launch()
|