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

assign_word_speakers fix #590

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

assign_word_speakers fix #590

wants to merge 3 commits into from

Conversation

grazder
Copy link

@grazder grazder commented Nov 20, 2023

Hello! Seems like here is mistake. We should look for closest instead of sum.

Simple counterexample:

predicted_sample - [0,1]

diarization_segments:
SPEAKER_00: [2, 3], [4, 5]
SPEAKER_01: [3, 4]

For SPEAKER_00 value of dia_tmp.groupby("speaker")["intersection"].sum().sort_values(ascending=False).index[0] will be sum([-1, -3]) = -4.
For SPEAKER_01 value will be sum([-2]) = -2.
(unless I made a mistake in my calculations in my head)

And therefore we will choose SPEAKER_01, even if it is not the closest

@grazder grazder changed the title Update diarize.py assign_word_speakers fix Nov 20, 2023
@grazder grazder marked this pull request as draft November 20, 2023 18:27
@grazder grazder marked this pull request as ready for review November 20, 2023 18:31
IgorTavcar added a commit to IgorTavcar/whisperX that referenced this pull request Jan 7, 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.

None yet

1 participant