Update xtts.py
Browse files
xtts.py
CHANGED
@@ -4,6 +4,7 @@ import torch
|
|
4 |
import traceback
|
5 |
from TTS.api import TTS
|
6 |
|
|
|
7 |
|
8 |
api=os.environ.get('api')
|
9 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
@@ -11,16 +12,17 @@ tts=None
|
|
11 |
model=None
|
12 |
|
13 |
root=os.path.dirname(os.path.abspath(__file__))
|
14 |
-
sample_root=f'{root}/samples'
|
15 |
-
if not os.path.exists(sample_root):
|
16 |
-
os.makedirs(sample_root)
|
17 |
|
18 |
LIBROSA_CACHE_DIR=f'{root}/caches'
|
19 |
if not os.path.exists(LIBROSA_CACHE_DIR):
|
20 |
os.makedirs(LIBROSA_CACHE_DIR)
|
21 |
os.environ["LIBROSA_CACHE_DIR"]=LIBROSA_CACHE_DIR
|
22 |
|
|
|
|
|
|
|
23 |
default_sample=f'{root}/sample.wav', f'{sample_root}/sample.pt'
|
|
|
24 |
ffmpeg=f'{root}/ffmpeg'
|
25 |
|
26 |
if api:
|
|
|
4 |
import traceback
|
5 |
from TTS.api import TTS
|
6 |
|
7 |
+
os.environ["COQUI_TOS_AGREED"]="1"
|
8 |
|
9 |
api=os.environ.get('api')
|
10 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
|
|
12 |
model=None
|
13 |
|
14 |
root=os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
|
|
15 |
|
16 |
LIBROSA_CACHE_DIR=f'{root}/caches'
|
17 |
if not os.path.exists(LIBROSA_CACHE_DIR):
|
18 |
os.makedirs(LIBROSA_CACHE_DIR)
|
19 |
os.environ["LIBROSA_CACHE_DIR"]=LIBROSA_CACHE_DIR
|
20 |
|
21 |
+
sample_root=f'{root}/samples'
|
22 |
+
if not os.path.exists(sample_root):
|
23 |
+
os.makedirs(sample_root)
|
24 |
default_sample=f'{root}/sample.wav', f'{sample_root}/sample.pt'
|
25 |
+
|
26 |
ffmpeg=f'{root}/ffmpeg'
|
27 |
|
28 |
if api:
|