quaint-ice-45324
12/01/2025, 10:23 PMdef commit_user_turn(
self,
*,
audio_detached: bool,
transcript_timeout: float,
stt_flush_duration: float = 2.0,
) -> None:
if not self._stt or self._closing.is_set():
return
async def _commit_user_turn() -> None:
if time.time() - self._last_final_transcript_time > 0.5:
# if the last final transcript is received more than 0.5s ago
# append a silence frame to the stt to flush the buffer
self._final_transcript_received.clear()
does this essentially mean that if we're doing a push to talk sort of thing, and the person says a statement, waits a bit, the STT emits a speech final, and then it takes them >0.5s to "submit" what they said -> then we're expecting the STT to emit another speech final event and are willing to wait transcript_timeout long for it? Do many stt providers support this? I don't see why they'd send another speech final event just because stt_flush_duration seconds of silence was sent?