Files
pipecat/tests
James Hush 67ea485566 Fix race condition in SpeechTimeoutUserTurnStopStrategy finalized transcript handling
When a finalized transcript arrived after user_speech_timeout had elapsed
from the VAD stop, the strategy would trigger the turn stop immediately
without giving the user time to resume speaking. This happened because
STT processing latency consumed the user_speech_timeout window — by the
time the transcript arrived, the elapsed time check passed even though
the user was still mid-sentence.

The fix removes the immediate early trigger path and instead lets the
original timeout (which includes the STT wait component) complete
naturally. When remaining user_speech_timeout > 0, the timeout is
shortened since STT is done. When it has elapsed, the existing timeout
continues running, providing a buffer for VAD to detect resumed speech.
2026-02-12 12:10:34 +08:00
..
2026-01-28 09:15:42 -08:00
2026-01-18 08:22:22 -05:00