You've already forked Irene-Voice-Assistant
mirror of
https://github.com/janvarev/Irene-Voice-Assistant.git
synced 2025-11-23 22:45:08 +02:00
5.4
- опция useTTSCache - ttsCache файлы кладутся в подпапку tts_cache/<ttsEngineId>
This commit is contained in:
@@ -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"])
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user