Spaces:
Running
Running
Kikirilkov
commited on
Commit
•
9ec632b
1
Parent(s):
c012349
Update app.py
Browse files
app.py
CHANGED
@@ -12,10 +12,10 @@ import torch
|
|
12 |
from TTS.api import TTS
|
13 |
|
14 |
# Get device
|
15 |
-
device = "
|
16 |
|
17 |
# Init TTS
|
18 |
-
tts = TTS("tts_models
|
19 |
|
20 |
def voice_clone(text: str, speaker_wav: str, language: str):
|
21 |
# Run TTS
|
|
|
12 |
from TTS.api import TTS
|
13 |
|
14 |
# Get device
|
15 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
16 |
|
17 |
# Init TTS
|
18 |
+
tts = TTS("/home/user/.local/share/tts/tts_models--multilingual--multi-dataset--xtts_v2").to(device)
|
19 |
|
20 |
def voice_clone(text: str, speaker_wav: str, language: str):
|
21 |
# Run TTS
|