update: 长按设备ASR适配

This commit is contained in:
Sakura-RanChen
2025-12-11 17:12:56 +08:00
parent 3a74b30a0e
commit fbfc408e94
11 changed files with 195 additions and 323 deletions
@@ -2,7 +2,6 @@ import time
import numpy as np
import torch
import opuslib_next
import gc
from config.logger import setup_logging
from core.providers.vad.base import VADProviderBase
@@ -46,7 +45,7 @@ class VADProvider(VADProviderBase):
def is_vad(self, conn, opus_packet):
# 手动模式:直接返回True,不进行实时VAD检测,所有音频都缓存
if conn.client_listen_mode not in ["auto", "realtime"]:
if conn.client_listen_mode == "manual":
return True
try: