livekit / python-sdks

LiveKit real-time and server SDKs for Python
https://docs.livekit.io
Apache License 2.0
74 stars 24 forks source link

Blank "active_speakers_changed" events are fired even when there are no changes #148

Open avivace opened 5 months ago

avivace commented 5 months ago

I'm not sure if this is the right repository but it's happening with the Python RTC sdk (I don't know if it doesn't happen with other SDKs).

I have a very simple setup in which I connect to a room with the RTC library. I then start watching for active_speakers_changed room events with a simple:

@room.on("active_speakers_changed")
def on_active_speakers_changed(speakers: list[rtc.Participant]):
   [...]

When a speaker starts speaking I successfully receive the events but after this I usually get other events of the same time when really nothing as changed, in fact the reported list of partecipants who are active speakers doesn't change. Am I missing something? Are there other metadata sent over which can change and I'm not looking at?

davidzhao commented 5 months ago

hi, could you print out a sequence of these events? it'd be helpful to see the pattern.