Merge pull request #3605 from pipecat-ai/aleix/gemini-live-schedule-transcription-timeout-handler

GeminiLiveLLMService: let the transcription timeout handler be scheduled
This commit is contained in:
Aleix Conchillo Flaqué
2026-01-30 22:44:05 -08:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

1
changelog/3605.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed `GeminiLiveLLMService` transcription timeout handler not being scheduled by yielding to the event loop after task creation.

View File

@@ -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."""