From d87f3543c7ccb441f868ec217bbc8e753a34468b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Fri, 30 Jan 2026 22:33:39 -0800 Subject: [PATCH] GeminiLiveLLMService: let the transcription timeout handler be scheduled --- changelog/3605.fixed.md | 1 + src/pipecat/services/google/gemini_live/llm.py | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog/3605.fixed.md diff --git a/changelog/3605.fixed.md b/changelog/3605.fixed.md new file mode 100644 index 000000000..405dc4db2 --- /dev/null +++ b/changelog/3605.fixed.md @@ -0,0 +1 @@ +- Fixed `GeminiLiveLLMService` transcription timeout handler not being scheduled by yielding to the event loop after task creation. diff --git a/src/pipecat/services/google/gemini_live/llm.py b/src/pipecat/services/google/gemini_live/llm.py index 895489955..e209f3d0a 100644 --- a/src/pipecat/services/google/gemini_live/llm.py +++ b/src/pipecat/services/google/gemini_live/llm.py @@ -1689,6 +1689,8 @@ class GeminiLiveLLMService(LLMService): self._transcription_timeout_task = self.create_task( self._transcription_timeout_handler() ) + # Let the event loop schedule the taks before it gets cancelled. + await asyncio.sleep(0) async def _handle_msg_output_transcription(self, message: LiveServerMessage): """Handle the output transcription message."""