diff --git a/plugins/core.py b/plugins/core.py index 1e23612..f6012b7 100644 --- a/plugins/core.py +++ b/plugins/core.py @@ -59,6 +59,10 @@ def start_with_options(core:VACore, manifest:dict): core.tts_cache_dir = "tts_cache" if not os.path.exists(core.tts_cache_dir): os.mkdir(core.tts_cache_dir) + if not os.path.exists(core.tts_cache_dir+"/"+core.ttsEngineId): + os.mkdir(core.tts_cache_dir+"/"+core.ttsEngineId) + + import lingua_franca lingua_franca.load_language(options["linguaFrancaLang"]) diff --git a/vacore.py b/vacore.py index f712655..2d242ee 100644 --- a/vacore.py +++ b/vacore.py @@ -7,7 +7,7 @@ from threading import Timer from jaa import JaaCore -version = "5.3" +version = "5.4" # main VACore class @@ -202,8 +202,8 @@ class VACore(JaaCore): def get_tts_cache_file(self, text_to_speech:str): hash = hashlib.md5(text_to_speech.encode('utf-8')).hexdigest() text_slice = text_to_speech[:40] - filename = ".".join([self.ttsEngineId,text_slice, hash, "wav"]) - return self.tts_cache_dir+"/"+filename + filename = ".".join([text_slice, hash, "wav"]) + return self.tts_cache_dir+"/"+self.ttsEngineId+"/"+filename def all_num_to_text(self,text:str): from utils.all_num_to_text import all_num_to_text