update:优化代码

This commit is contained in:
hrz
2025-11-23 15:11:35 +08:00
parent 5d439a4168
commit 83a3d0eabe
7 changed files with 38 additions and 20 deletions
@@ -38,9 +38,12 @@ class VADProvider(VADProviderBase):
self.frame_window_threshold = 3
def __del__(self):
if hasattr(self, 'decoder'):
del self.decoder
gc.collect()
if hasattr(self, 'decoder') and self.decoder is not None:
try:
del self.decoder
gc.collect()
except Exception:
pass
def is_vad(self, conn, opus_packet):
try: