Skip to content

Chore Add session_ready callback#33

Merged
sebvanleuven merged 16 commits intomainfrom
fix/add_session_ready_callback
Feb 11, 2026
Merged

Chore Add session_ready callback#33
sebvanleuven merged 16 commits intomainfrom
fix/add_session_ready_callback

Conversation

@sebvanleuven
Copy link
Contributor

@sebvanleuven sebvanleuven commented Feb 10, 2026

Add session_ready callback so consumer know when to start streaming.


Summary by cubic

Adds a session_ready callback and SESSION_READY event so clients know exactly when the session is ready to receive TTS/user audio. Also improves connection close handling and cleanup for more reliable shutdowns.

  • New Features

    • Added on_session_ready callback in streaming; client emits AnamEvent.SESSION_READY when the server signals SESSION_READY.
  • Bug Fixes

    • Stronger close semantics: use ConnectionClosedCode, emit close once, distinguish server-closed vs WebRTC failures, and auto-close on server errors.
    • Better cleanup on close: clear message history, reset session state, guard against double close, and set closed before awaiting shutdown.
    • Faster/quieter connections: WebRTC timeout set to 2s; move ICE/data channel/close logs to debug.

Written for commit 1455bbc. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

@sebvanleuven sebvanleuven merged commit a75b9ed into main Feb 11, 2026
8 checks passed
@sebvanleuven sebvanleuven deleted the fix/add_session_ready_callback branch February 11, 2026 14:14
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