Spaces:
Runtime error
Runtime error
rockdrigoma
commited on
Commit
•
1785140
1
Parent(s):
57171e6
Update app.py
Browse files
app.py
CHANGED
@@ -1,17 +1,18 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
-
from TTS.
|
|
|
|
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
model.load_checkpoint(config, checkpoint_dir="/model/", eval=True)
|
9 |
-
model.cuda()
|
10 |
|
11 |
|
12 |
def generateVoice(prompt):
|
13 |
outputs = model.synthesize(
|
14 |
-
"
|
15 |
config,
|
16 |
speaker_wav="/guide_recording/guide.wav",
|
17 |
gpt_cond_len=3,
|
|
|
1 |
+
import spaces
|
2 |
import gradio as gr
|
3 |
+
import torch
|
4 |
+
from TTS.api import TTS
|
5 |
+
import os
|
6 |
+
os.environ["COQUI_TOS_AGREED"] = "1"
|
7 |
|
8 |
+
device = "cuda"
|
9 |
+
|
10 |
+
tts = TTS("tts_models/multilingual/multi-dataset/xtts_bill_spa").to(device)
|
|
|
|
|
11 |
|
12 |
|
13 |
def generateVoice(prompt):
|
14 |
outputs = model.synthesize(
|
15 |
+
"Hola amigos, bienvenidos a mi canal",
|
16 |
config,
|
17 |
speaker_wav="/guide_recording/guide.wav",
|
18 |
gpt_cond_len=3,
|