update:替换词功能

This commit is contained in:
rainv123
2026-04-24 10:06:26 +08:00
parent 550397de98
commit 606a42cfb2
44 changed files with 1030 additions and 37 deletions
+7
View File
@@ -726,6 +726,13 @@ class ConnectionHandler:
if private_config.get("context_providers", None) is not None:
self.config["context_providers"] = private_config["context_providers"]
# 注入替换词到 TTS 模块配置
if private_config.get("correct_words", None) is not None:
select_tts_module = self.config["selected_module"]["TTS"]
self.config["TTS"][select_tts_module]["correct_words"] = private_config[
"correct_words"
]
# 使用 run_in_executor 在线程池中执行 initialize_modules,避免阻塞主循环
try:
modules = await self.loop.run_in_executor(