I expected the transcriptionReceived event to be received on the participant who produced the transcript, whether it's a remote or local participant.
Current Behaviour
Transcriptions for remote participants are attached to the agent when it's not the transcription for the local participant. This affects the useTranscription hook in the React library, making it seem impossible to receive transcriptions for any remote participant.
Thanks for the report! Yeah, this is a bug! We have some internal protocol changes pending in that regard as well so I'll include the fix for that in this update and link to the issue here.
Describe the bug
Expectation
I expected the
transcriptionReceived
event to be received on the participant who produced the transcript, whether it's a remote or local participant.Current Behaviour
Transcriptions for remote participants are attached to the agent when it's not the transcription for the local participant. This affects the
useTranscription
hook in the React library, making it seem impossible to receive transcriptions for any remote participant.I was unable to get feedback on Slack, so I'm assuming this is not intended. I believe the routing of the packet here is incorrect for the
RemoteParticipant
: https://github.com/livekit/client-sdk-js/blob/c7b7f9e701b3b484390c423fc74bf0cf04001299/src/room/Room.ts#L1521-L1525 It should not use theRemoteParticipant
passed in (which is the agent), but instead use the identity to find the correct remote participant as well.If this routing is not intended, I'd be happy to submit a PR.
Reproduction
(reproduction is quite heavy and potentially not necessary. I would consider creating one when explicitly demanded)
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
Workaround is basically hook into the EventEngine and route the event stream manually