From f78f6fc529f00b305c395d934469dda15e764aab Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Mon, 26 May 2025 11:04:13 +0800 Subject: [PATCH] =?UTF-8?q?update:=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/connection.py | 3 +-- main/xiaozhi-server/core/providers/tts/base.py | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/main/xiaozhi-server/core/connection.py b/main/xiaozhi-server/core/connection.py index 6460643d..e4510286 100644 --- a/main/xiaozhi-server/core/connection.py +++ b/main/xiaozhi-server/core/connection.py @@ -96,10 +96,9 @@ class ConnectionHandler: # 依赖的组件 self.vad = None self.asr = None - self.tts = None self._asr = _asr self._vad = _vad - self._tts = _tts + self.tts = _tts self.llm = _llm self.memory = _memory self.intent = _intent diff --git a/main/xiaozhi-server/core/providers/tts/base.py b/main/xiaozhi-server/core/providers/tts/base.py index 2ae01acc..2264492d 100644 --- a/main/xiaozhi-server/core/providers/tts/base.py +++ b/main/xiaozhi-server/core/providers/tts/base.py @@ -38,7 +38,21 @@ class TTSProviderBase(ABC): ";", ":", ) - self.first_sentence_punctuations = (",", ",") + self.first_sentence_punctuations = ( + ",", + "~", + "、", + ",", + "。", + ".", + "?", + "?", + "!", + "!", + ";", + ";", + ":", + ) self.tts_stop_request = False self.processed_chars = 0 self.is_first_sentence = True