Skip to content

Commit

Permalink
fix:stop_session (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Sep 20, 2024
1 parent 0c89161 commit ef4c31a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@ def CQS_action(self, phrase: str, data: dict):
self.speak_how_to(data.get("how_to"))

def stop_session(self, sess: Session):
if self.session_results[sess.session_id]["is_speaking"]:
self.session_results[sess.session_id]["stop_signaled"] = True
return True
if sess.session_id in self.session_results:
if self.session_results[sess.session_id]["is_speaking"]:
self.session_results[sess.session_id]["stop_signaled"] = True
return True
return False


Expand Down

0 comments on commit ef4c31a

Please sign in to comment.