fix:manager下发配置字符转数字bug

This commit is contained in:
hrz
2025-04-14 18:30:58 +08:00
parent 2bab917b3e
commit 703ecfae40
13 changed files with 72 additions and 51 deletions
+2 -2
View File
@@ -204,7 +204,7 @@ class ConnectionHandler:
self.headers.get("device-id", None),
self.headers.get("client-id", None),
)
private_config["delete_audio"] = self.config["delete_audio"]
private_config["delete_audio"] = bool(self.config["delete_audio"], True)
self.logger.bind(tag=TAG).info(f"获取差异化配置成功: {private_config}")
except Exception as e:
self.logger.bind(tag=TAG).error(f"获取差异化配置失败: {e}")
@@ -702,7 +702,7 @@ class ConnectionHandler:
opus_datas, text_index, tts_file = [], 0, None
try:
self.logger.bind(tag=TAG).debug("正在处理TTS任务...")
tts_timeout = self.config.get("tts_timeout", 10)
tts_timeout = int(self.config.get("tts_timeout", 10))
tts_file, text, text_index = future.result(timeout=tts_timeout)
if text is None or len(text) <= 0:
self.logger.bind(tag=TAG).error(