From 31657e1dc0f7221dbc80c4db85696600b53324a4 Mon Sep 17 00:00:00 2001 From: Chingfeng Li Date: Mon, 25 Aug 2025 18:26:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=9C=AA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/config.yaml | 2 -- main/xiaozhi-server/core/connection.py | 3 --- main/xiaozhi-server/core/providers/tts/base.py | 2 -- 3 files changed, 7 deletions(-) diff --git a/main/xiaozhi-server/config.yaml b/main/xiaozhi-server/config.yaml index b3c1b1a8..51b6a617 100644 --- a/main/xiaozhi-server/config.yaml +++ b/main/xiaozhi-server/config.yaml @@ -59,8 +59,6 @@ log: delete_audio: true # 没有语音输入多久后断开连接(秒),默认2分钟,即120秒 close_connection_no_voice_time: 120 -# TTS请求超时时间(秒) -tts_timeout: 10 # 说完话是否开启提示音 enable_stop_tts_notify: false # 说完话是否开启提示音,音效地址 diff --git a/main/xiaozhi-server/core/connection.py b/main/xiaozhi-server/core/connection.py index 2ca2602a..5f7859ea 100644 --- a/main/xiaozhi-server/core/connection.py +++ b/main/xiaozhi-server/core/connection.py @@ -141,9 +141,6 @@ class ConnectionHandler: self.cmd_exit = self.config["exit_commands"] self.max_cmd_length = 0 - for cmd in self.cmd_exit: - if len(cmd) > self.max_cmd_length: - self.max_cmd_length = len(cmd) # 是否在聊天结束后关闭连接 self.close_after_chat = False diff --git a/main/xiaozhi-server/core/providers/tts/base.py b/main/xiaozhi-server/core/providers/tts/base.py index 6a29f1f5..14301205 100644 --- a/main/xiaozhi-server/core/providers/tts/base.py +++ b/main/xiaozhi-server/core/providers/tts/base.py @@ -33,7 +33,6 @@ class TTSProviderBase(ABC): def __init__(self, config, delete_audio_file): self.interface_type = InterfaceType.NON_STREAM self.conn = None - self.tts_timeout = 10 self.delete_audio_file = delete_audio_file self.audio_file_type = "wav" self.output_file = config.get("output_dir", "tmp/") @@ -192,7 +191,6 @@ class TTSProviderBase(ABC): async def open_audio_channels(self, conn): self.conn = conn - self.tts_timeout = conn.config.get("tts_timeout", 10) # tts 消化线程 self.tts_priority_thread = threading.Thread( target=self.tts_text_priority_thread, daemon=True