Spaces:
Runtime error
Runtime error
lcsouzamenezes
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -5,13 +5,15 @@ 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_v2").to(device)
|
11 |
|
12 |
@spaces.GPU(enable_queue=False)
|
13 |
def clone(text, audio):
|
14 |
-
tts.tts_to_file(text=text, speaker_wav=audio, language="pt", file_path="./output.wav")
|
15 |
return "./output.wav"
|
16 |
|
17 |
iface = gr.Interface(fn=clone,
|
|
|
5 |
import os
|
6 |
os.environ["COQUI_TOS_AGREED"] = "1"
|
7 |
|
8 |
+
#device = "cuda" if torch.cuda.is_available() else "cpu"
|
9 |
+
|
10 |
+
device = "cpu"
|
11 |
|
12 |
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
|
13 |
|
14 |
@spaces.GPU(enable_queue=False)
|
15 |
def clone(text, audio):
|
16 |
+
tts.tts_to_file(text=text, speaker_wav=audio, language="pt-br", file_path="./output.wav")
|
17 |
return "./output.wav"
|
18 |
|
19 |
iface = gr.Interface(fn=clone,
|