diff --git a/main/xiaozhi-server/core/handle/receiveAudioHandle.py b/main/xiaozhi-server/core/handle/receiveAudioHandle.py index f3292e1c5..e41e7720d 100644 --- a/main/xiaozhi-server/core/handle/receiveAudioHandle.py +++ b/main/xiaozhi-server/core/handle/receiveAudioHandle.py @@ -13,6 +13,7 @@ TAG = __name__ async def handleAudioMessage(conn, audio): # 当前片段是否有人说话 have_voice = conn.vad.is_vad(conn, audio) + conn.logger.bind(tag=TAG).info(f"收到音频数据,have_voice: {have_voice},len: {len(audio)}") # 如果设备刚刚被唤醒,短暂忽略VAD检测 if have_voice and hasattr(conn, "just_woken_up") and conn.just_woken_up: have_voice = False diff --git a/main/xiaozhi-server/core/providers/tts/volcengine.py b/main/xiaozhi-server/core/providers/tts/volcengine.py index 9a167a652..444716368 100644 --- a/main/xiaozhi-server/core/providers/tts/volcengine.py +++ b/main/xiaozhi-server/core/providers/tts/volcengine.py @@ -308,7 +308,7 @@ class TTSProvider(TTSProviderBase): # 检查连接是否存在且处于 open 状态 # websockets 库的自动 ping/pong 机制会处理连接健康检查 if self.ws: - logger.bind(tag=TAG).debug("WebSocket connection is active.") + logger.bind(tag=TAG).info("WebSocket connection is active.") return # 如果连接不存在或已关闭,则重新连接 @@ -350,8 +350,8 @@ class TTSProvider(TTSProviderBase): try: # 建立新连接 if self.ws is None: - await handleAbortMessage(self.conn) logger.bind(tag=TAG).error("WebSocket连接不存在,终止发送文本") + await handleAbortMessage(self.conn) return # 过滤Markdown