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:
1
changelog/3605.fixed.md
Normal file
1
changelog/3605.fixed.md
Normal file
@@ -0,0 +1 @@
|
||||
- Fixed `GeminiLiveLLMService` transcription timeout handler not being scheduled by yielding to the event loop after task creation.
|
||||
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user