fix: non vad user turn timestamp

This commit is contained in:
Sabiha Khan 2026-07-07 14:41:44 +05:30
parent 41ffe91e20
commit 324a019b5f
2 changed files with 29 additions and 1 deletions

View file

@ -137,7 +137,10 @@ class InMemoryLogsBuffer:
self, timestamp: Optional[str] = None, *, from_vad: bool = False
):
"""Record when the user started speaking for the current turn."""
if self._user_speech_start_from_vad and not from_vad:
vad_interval_is_open = (
self._user_speech_start_from_vad and self._user_speech_end_timestamp is None
)
if vad_interval_is_open and not from_vad:
return
self._user_speech_start_timestamp = timestamp or self._now_iso()