修复了收到心跳包后会断开连接的bug
This commit is contained in:
1 parent
20363bf9a1
commit
f1a844c84a
2 files changed
+38
-27
No files matched your search
@@ -10,5 +10,8 @@ class VAD():
|
||||
self.min_act_time = min_act_time # 最小活动时间,单位秒
|
||||
|
||||
def is_speech(self,data):
|
||||
byte_data = base64.b64decode(data)
|
||||
return self.vad.is_speech(byte_data, self.RATE)
|
||||
try:
|
||||
byte_data = base64.b64decode(data)
|
||||
return self.vad.is_speech(byte_data, self.RATE)
|
||||
except Exception as e:
|
||||
return False
|
||||
Reference in new issue
Block a user