fix: 反复打断任务没有被清除,vad四帧语音识别

This commit is contained in:
Sakura-RanChen
2025-06-20 16:25:08 +08:00
parent 979fea0d60
commit 12cee4027a
3 changed files with 41 additions and 5 deletions
+3 -2
View File
@@ -115,6 +115,7 @@ class ConnectionHandler:
self.client_have_voice_last_time = 0.0
self.client_no_voice_last_time = 0.0
self.client_voice_stop = False
self.client_voice_frame_count = 0
# asr相关变量
# 因为实际部署时可能会用到公共的本地ASR,不能把变量暴露给公共ASR
@@ -627,8 +628,8 @@ class ConnectionHandler:
)
memory_str = future.result()
uuid_str = str(uuid.uuid4()).replace("-", "")
self.sentence_id = uuid_str
self.sentence_id = str(uuid.uuid4().hex)
if self.intent_type == "function_call" and functions is not None:
# 使用支持functions的streaming接口