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

Rename participant_identity in Transcription #706

Merged
merged 1 commit into from
May 17, 2024
Merged

Conversation

dennwc
Copy link
Contributor

@dennwc dennwc commented May 7, 2024

There are two fields named participant_identity in context of Transcription. It's not clear which one corresponds to the transcriber agent, and which one is for the participant which got its speech transcribed.

This change renames the Transcription field to transcribed_participant_identity so to clarify that it's used for the transcribed participant.

@dennwc dennwc self-assigned this May 7, 2024
Copy link

changeset-bot bot commented May 7, 2024

🦋 Changeset detected

Latest commit: c43fc1d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@theomonnom
Copy link
Member

theomonnom commented May 7, 2024

Do we need the usecase where participant_identity is the transcriber, and the participant_identity inside the transcription is the participant that got its speech transcribed?

@dennwc
Copy link
Contributor Author

dennwc commented May 7, 2024

That's a very good question 🤔

The shared identity in DataPacket is used by all SDKs to route this data packet to a specific RemoteParticipant handler. In that sense, it would be easier for end users if this would be the identity of the transciption (same as audio pre-transcription).

But the problem with this approach is that currently LK server will force-set DataPacket.participant_identity to match identity of the transcription agent. We could special-case transcriptions, but this would kind of defeat the purpose of a shared field that always means the same thing.

Thus, what you propose makes more sense. So DataPacket.participant_identity is the agent who made the transcription, while Transcription.participant_identity is the identity of the participant's audio that was transcribed.

If that make case, let me rename Transcription.participant_identity to transcribed_participant_identity and remove the compatibility code from livekit/client-sdk-js#1130.

@biglittlebigben
Copy link
Contributor

Do we need the usecase where participant_identity is the transcriber, and the participant_identity inside the transcription is the participant that got its speech transcribed?

This is indeed the intent of the extra field.

@biglittlebigben
Copy link
Contributor

I have no strong opinion wrt renaming the field or not.

There are two fields named participant_identity in context of Transcription. It's not clear which one corresponds to the transcriber agent, and which one is for the participant which got its speech transcribed.

This change renames the Transcription field to transcribed_participant_identity so to clarify that it's used for the transcribed participant.
@dennwc dennwc force-pushed the transcription-identity branch from e05fb5b to c43fc1d Compare May 17, 2024 14:27
@dennwc
Copy link
Contributor Author

dennwc commented May 17, 2024

@biglittlebigben @theomonnom I removed the notice and renamed the field. WDYT?

@dennwc dennwc changed the title Should use participant identity from DataPacket for transcriptions Rename participant_identity in Transcription May 17, 2024
Copy link
Contributor

@biglittlebigben biglittlebigben left a comment

Choose a reason for hiding this comment

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

LGTM

@dennwc dennwc merged commit 47e4c6b into main May 17, 2024
3 checks passed
@dennwc dennwc deleted the transcription-identity branch May 17, 2024 18:58
@github-actions github-actions bot mentioned this pull request May 14, 2024
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.

3 participants