update: 优化vad判断逻辑

This commit is contained in:
Sakura-RanChen
2025-10-20 11:45:50 +08:00
parent 2e6aced1bd
commit c06a7b1db6
5 changed files with 20 additions and 23 deletions
+1 -1
View File
@@ -117,8 +117,8 @@ class ConnectionHandler:
self.client_have_voice = False
self.last_activity_time = 0.0 # 统一的活动时间戳(毫秒)
self.client_voice_stop = False
self.client_voice_window = deque(maxlen=5)
self.last_is_voice = False
self.continuous_false_count = 0
# asr相关变量
# 因为实际部署时可能会用到公共的本地ASR,不能把变量暴露给公共ASR