From 253a1d1114b71b483f818f49f29ce224e0abc627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 29 Jan 2026 13:08:51 -0800 Subject: [PATCH] UserTurnController: reset user turn timeout with interim transcriptions --- changelog/3594.fixed.md | 1 + src/pipecat/turns/user_turn_controller.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelog/3594.fixed.md diff --git a/changelog/3594.fixed.md b/changelog/3594.fixed.md new file mode 100644 index 000000000..1c47ff490 --- /dev/null +++ b/changelog/3594.fixed.md @@ -0,0 +1 @@ +- Fixed `UserTurnController` to reset user turn timeout when interim transcriptions are received. diff --git a/src/pipecat/turns/user_turn_controller.py b/src/pipecat/turns/user_turn_controller.py index 05cb46988..adaafd298 100644 --- a/src/pipecat/turns/user_turn_controller.py +++ b/src/pipecat/turns/user_turn_controller.py @@ -11,6 +11,7 @@ from typing import Optional, Type from pipecat.frames.frames import ( Frame, + InterimTranscriptionFrame, TranscriptionFrame, UserStartedSpeakingFrame, UserStoppedSpeakingFrame, @@ -156,7 +157,7 @@ class UserTurnController(BaseObject): await self._handle_vad_user_started_speaking(frame) elif isinstance(frame, VADUserStoppedSpeakingFrame): await self._handle_vad_user_stopped_speaking(frame) - elif isinstance(frame, TranscriptionFrame): + elif isinstance(frame, (TranscriptionFrame, InterimTranscriptionFrame)): await self._handle_transcription(frame) for strategy in self._user_turn_strategies.start or []: @@ -209,8 +210,8 @@ class UserTurnController(BaseObject): # The user stopped talking, let's reset the user turn timeout. self._user_turn_stop_timeout_event.set() - async def _handle_transcription(self, frame: TranscriptionFrame): - # We have creceived a transcription, let's reset the user turn timeout. + async def _handle_transcription(self, frame: TranscriptionFrame | InterimTranscriptionFrame): + # We have received a transcription, let's reset the user turn timeout. self._user_turn_stop_timeout_event.set() async def _on_push_frame(