We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5896742 commit 0458e2cCopy full SHA for 0458e2c
.changeset/pink-kiwis-grab.md
@@ -0,0 +1,5 @@
1
+---
2
+"livekit-agents": patch
3
4
+
5
+fix: _play_speech get stuck due to orphan speech handle
livekit-agents/livekit/agents/pipeline/pipeline_agent.py
@@ -706,6 +706,9 @@ def _synthesize_agent_reply(self):
706
self._agent_reply_task = asyncio.create_task(
707
self._synthesize_answer_task(self._agent_reply_task, new_handle)
708
)
709
+ self._agent_reply_task.add_done_callback(
710
+ lambda t: new_handle.cancel() if t.cancelled() else None
711
+ )
712
713
@utils.log_exceptions(logger=logger)
714
async def _synthesize_answer_task(
0 commit comments