Skip to content

Conversation

AngeloGiacco
Copy link
Collaborator

Initialize should_stop and related resources in __init__ and add robustness checks to stop() methods to prevent AttributeError.

The should_stop attribute and other resources (like output_thread, in_stream, out_stream, p) were only initialized in the start() method. If stop() was called before start(), it would result in an AttributeError. This PR ensures these attributes are always present and safely handled, preventing crashes in scenarios like conversation.end_session() being called without a prior start().


Slack Thread

Open in Cursor Open in Web

Co-authored-by: angelo <angelo@elevenlabs.io>
Copy link

cursor bot commented Sep 19, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Initialize and clean up audio streams and PyAudio instances. Add a _started flag to prevent double starts and ensure proper cleanup.

Co-authored-by: angelo <angelo@elevenlabs.io>
@AngeloGiacco AngeloGiacco marked this pull request as ready for review September 19, 2025 10:52
@AngeloGiacco
Copy link
Collaborator Author

bugbot run

Copy link

cursor bot commented Sep 19, 2025

Skipping Bugbot: Bugbot is disabled for this repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants