Spaces:
Runtime error
Runtime error
Rehman1603
commited on
Commit
•
e6ca14c
1
Parent(s):
5bff1ff
Update Text_to_speech.py
Browse files- Text_to_speech.py +2 -1
Text_to_speech.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
import torch
|
2 |
from TTS.api import TTS
|
|
|
3 |
|
4 |
# Get device
|
5 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
6 |
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2",progress_bar=False).to(device)
|
7 |
-
|
8 |
|
9 |
def Text_to_Speech(transcribe_data,lang,voice):
|
10 |
# List available 🐸TTS models
|
|
|
1 |
import torch
|
2 |
from TTS.api import TTS
|
3 |
+
import os
|
4 |
|
5 |
# Get device
|
6 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
7 |
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2",progress_bar=False).to(device)
|
8 |
+
os.environ["COQUI_TOS_AGREED"] = "1"
|
9 |
|
10 |
def Text_to_Speech(transcribe_data,lang,voice):
|
11 |
# List available 🐸TTS models
|