update:优化日志打印

This commit is contained in:
hrz
2025-05-30 02:16:39 +08:00
parent 8f48e9ac0c
commit a0b0a0e1e8
2 changed files with 2 additions and 3 deletions
@@ -8,6 +8,7 @@ TTS上报功能已集成到ConnectionHandler类中。
具体实现请参考core/connection.py中的相关代码。
"""
import time
import opuslib_next
@@ -145,4 +146,4 @@ def enqueue_asr_report(conn, text, opus_data):
f"ASR数据已加入上报队列: {conn.device_id}, 不上报音频"
)
except Exception as e:
conn.logger.bind(tag=TAG).error(f"加入ASR上报队列失败: {text}, {e}")
conn.logger.bind(tag=TAG).debug(f"加入ASR上报队列失败: {text}, {e}")
@@ -107,7 +107,6 @@ class ASRProvider(ASRProviderBase):
# 等待初始化响应
try:
init_res = await self.asr_ws.recv()
logger.bind(tag=TAG).debug(f"收到原始响应: {init_res}")
result = self.parse_response(init_res)
logger.bind(tag=TAG).info(f"ASR服务初始化响应: {result}")
except Exception as e:
@@ -328,7 +327,6 @@ class ASRProvider(ASRProviderBase):
self.retry_delay
) # 继续等待,以便后续重试
except Exception as e:
logger.bind(tag=TAG).error(f"处理ASR结果时发生错误: {e}")
if not self.conn.stop_event.is_set():
await asyncio.sleep(2) # 增加重试延迟
except Exception as e: