Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ from TTS.tts.configs.xtts_config import XttsConfig
|
|
10 |
from TTS.tts.models.xtts import Xtts
|
11 |
from TTS.utils.generic_utils import get_user_data_dir
|
12 |
from huggingface_hub import hf_hub_download
|
|
|
13 |
|
14 |
# Configuración inicial
|
15 |
os.environ["COQUI_TOS_AGREED"] = "1"
|
@@ -28,6 +29,11 @@ check_and_install("unidic-lite")
|
|
28 |
# Descargar UniDic
|
29 |
os.system('python -m unidic download')
|
30 |
|
|
|
|
|
|
|
|
|
|
|
31 |
print("Descargando y configurando el modelo...")
|
32 |
repo_id = "Blakus/Pedro_Lab_XTTS"
|
33 |
local_dir = os.path.join(get_user_data_dir("tts"), "tts_models--multilingual--multi-dataset--xtts_v2")
|
|
|
10 |
from TTS.tts.models.xtts import Xtts
|
11 |
from TTS.utils.generic_utils import get_user_data_dir
|
12 |
from huggingface_hub import hf_hub_download
|
13 |
+
import MeCab
|
14 |
|
15 |
# Configuración inicial
|
16 |
os.environ["COQUI_TOS_AGREED"] = "1"
|
|
|
29 |
# Descargar UniDic
|
30 |
os.system('python -m unidic download')
|
31 |
|
32 |
+
# Configurar MeCab con la ruta explícita al archivo mecabrc
|
33 |
+
unidic_dir = os.path.dirname(os.path.abspath(MeCab.__file__))
|
34 |
+
mecabrc_path = os.path.join(unidic_dir, 'dicdir', 'mecabrc')
|
35 |
+
os.environ["MECABRC"] = mecabrc_path
|
36 |
+
|
37 |
print("Descargando y configurando el modelo...")
|
38 |
repo_id = "Blakus/Pedro_Lab_XTTS"
|
39 |
local_dir = os.path.join(get_user_data_dir("tts"), "tts_models--multilingual--multi-dataset--xtts_v2")
|