Skip to content

Commit

Permalink
voiceassistant: skip speech initialization if interrupted (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Sep 6, 2024
1 parent 061cbd6 commit 5ab4320
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-llamas-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-agents": patch
---

voiceassistant: skip speech initialization if interrupted
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,9 @@ async def _synthesize_answer_task(
self, chat_ctx=copied_ctx
)

if handle.interrupted:
return

synthesis_handle = self._synthesize_agent_speech(handle.id, llm_stream)
handle.initialize(source=llm_stream, synthesis_handle=synthesis_handle)

Expand Down

0 comments on commit 5ab4320

Please sign in to comment.