Skip to content

Commit

Permalink
fix uninitialized SpeechHandle error on interruption (#665)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Aug 23, 2024
1 parent 32cafac commit a3971f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-plants-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-agents": patch
---

fix uninitialized SpeechHandle error on interruption
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ def _commit_user_question_if_needed() -> None:
_commit_user_question_if_needed()

collected_text = speech_handle.synthesis_handle.tts_forwarder.played_text
interrupted = speech_handle.synthesis_handle.interrupted
interrupted = speech_handle.interrupted
is_using_tools = isinstance(speech_handle.source, LLMStream) and len(
speech_handle.source.function_calls
)
Expand Down Expand Up @@ -722,7 +722,7 @@ def _interrupt_if_possible(self) -> None:
if (
self._playing_speech is None
or not self._playing_speech.allow_interruptions
or self._playing_speech.synthesis_handle.interrupted
or self._playing_speech.interrupted
):
return

Expand Down

0 comments on commit a3971f4

Please sign in to comment.