mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
减少日志打印
This commit is contained in:
parent
419b0fbbec
commit
78442180c3
1 changed files with 2 additions and 1 deletions
|
|
@ -13,7 +13,8 @@ TAG = __name__
|
||||||
async def handleAudioMessage(conn, audio):
|
async def handleAudioMessage(conn, audio):
|
||||||
# 当前片段是否有人说话
|
# 当前片段是否有人说话
|
||||||
have_voice = conn.vad.is_vad(conn, audio)
|
have_voice = conn.vad.is_vad(conn, audio)
|
||||||
conn.logger.bind(tag=TAG).info(f"收到音频数据,have_voice: {have_voice},len: {len(audio)}")
|
if have_voice:
|
||||||
|
conn.logger.bind(tag=TAG).info(f"收到音频数据,len: {len(audio)}, wake_up: {conn.just_woken_up}")
|
||||||
# 如果设备刚刚被唤醒,短暂忽略VAD检测
|
# 如果设备刚刚被唤醒,短暂忽略VAD检测
|
||||||
if have_voice and hasattr(conn, "just_woken_up") and conn.just_woken_up:
|
if have_voice and hasattr(conn, "just_woken_up") and conn.just_woken_up:
|
||||||
have_voice = False
|
have_voice = False
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue