Tune engine vad config

This commit is contained in:
Xin Wang
2026-02-12 16:29:55 +08:00
parent a92a56b845
commit 543528239e
3 changed files with 76 additions and 25 deletions

View File

@@ -30,7 +30,7 @@ class EouDetector:
self.silence_start_time: Optional[float] = None
self.triggered = False
def process(self, vad_status: str) -> bool:
def process(self, vad_status: str, force_eligible: bool = False) -> bool:
"""
Process VAD status and detect end of utterance.
@@ -58,7 +58,7 @@ class EouDetector:
self.silence_start_time = now
speech_duration = self.silence_start_time - self.speech_start_time
if speech_duration < self.min_speech:
if speech_duration < self.min_speech and not force_eligible:
self.is_speaking = False
self.silence_start_time = None
return False