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
+6 -2
View File
@@ -395,8 +395,12 @@ def opus_datas_to_wav_bytes(opus_datas, sample_rate=16000, channels=1):
wf.writeframes(pcm_bytes)
return wav_buffer.getvalue()
finally:
del decoder
gc.collect()
if decoder is not None:
try:
del decoder
gc.collect()
except Exception:
pass
def check_vad_update(before_config, new_config):