From 33e00ead57903c233d19d7a9e19f02d171145509 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Mon, 3 Jun 2024 16:10:39 +0200 Subject: [PATCH] Update lollms_xtts.py --- lollms/services/xtts/lollms_xtts.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lollms/services/xtts/lollms_xtts.py b/lollms/services/xtts/lollms_xtts.py index d5a48e3..bbd0cf2 100644 --- a/lollms/services/xtts/lollms_xtts.py +++ b/lollms/services/xtts/lollms_xtts.py @@ -172,6 +172,10 @@ class LollmsXTTS(LollmsTTS): return LollmsXTTS def run_xtts_api_server(self): + root_dir = self.app.lollms_paths.personal_path + shared_folder = root_dir/"shared" + xtts_path = shared_folder / "xtts" + # Get the path to the current Python interpreter ASCIIColors.yellow("Loading XTTS ") options= "" @@ -179,7 +183,7 @@ class LollmsXTTS(LollmsTTS): options += " --deepspeed" if self.use_streaming_mode: options += " --streaming-mode --streaming-mode-improve --stream-play-sync" - process = run_python_script_in_env("xtts", f"-m xtts_api_server {options} -o {self.output_folder} -sf {self.voice_samples_path} -p {self.xtts_base_url.split(':')[-1].replace('/','')}", wait= False) + process = run_python_script_in_env("xtts", f"-m xtts_api_server {options} -o {self.output_folder} -sf {self.voice_samples_path} -p {self.xtts_base_url.split(':')[-1].replace('/','')}", cwd=xtts_path, wait= False) return process def wait_for_service_in_another_thread(self, max_retries=150, show_warning=True):