Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Participant is not unlinked during disconnection, so human input is out of sync #1124

Open
brightsparc opened this issue Nov 22, 2024 · 0 comments · May be fixed by #1125
Open

Participant is not unlinked during disconnection, so human input is out of sync #1124

brightsparc opened this issue Nov 22, 2024 · 0 comments · May be fixed by #1125
Labels
bug Something isn't working

Comments

@brightsparc
Copy link
Contributor

brightsparc commented Nov 22, 2024

When a participant disconnects from an active agent the human input stays connected with the old participant, and so when a participant reconnects, the transcription and sst, vad and transcript forwarder are not connected.

The fix is to add a method to unlink_participant which requires moving a number of nested methods to class level for unlink:

    def _unlink_participant(self) -> None:
        """Clean up participant-related resources"""
        if self._human_input is None:
            return

        # Remove all event listeners using class methods
        self._human_input.off("start_of_speech", self._on_start_of_speech)
        self._human_input.off("vad_inference_done", self._on_vad_inference_done)
        self._human_input.off("end_of_speech", self._on_end_of_speech)
        self._human_input.off("interim_transcript", self._on_interim_transcript)
        self._human_input.off("final_transcript", self._on_final_transcript)
        self._human_input = None

Steps to reproduce

  1. Start room with participant
  2. Have agent join
  3. Leave room but have agent stay connected
  4. Rejoin room
  5. Have candidate speak and notice that transcription is not being forwarded.
@brightsparc brightsparc added the bug Something isn't working label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant