Skip to content
New issue

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

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

Already on GitHub? # to your account

How to calculate the relavent error rate in diarization overlap? #65

Open
axuan731 opened this issue Aug 20, 2022 · 1 comment
Open

Comments

@axuan731
Copy link

I have a ref rttm file and a sys rttm file, I want to compute the FA = false alarm rate (%) / Miss. = missed detection rate (%) / F1 = F1-score (%) in the paper "End-to-end speaker segmentation for overlap-aware resegmentation".But I cant find the place to evaluate them in pyannote2.0
Thanks for helping!

@hbredin hbredin transferred this issue from pyannote/pyannote-audio Aug 31, 2022
@hbredin
Copy link
Member

hbredin commented Aug 31, 2022

pyannote-metrics has some code to do that.

def to_overlap(current_file: dict) -> Annotation:
"""Get overlapped speech reference annotation
Parameters
----------
current_file : `dict`
File yielded by pyannote.database protocols.
Returns
-------
overlap : `pyannote.core.Annotation`
Overlapped speech reference.
"""
reference = current_file["annotation"]
overlap = Timeline(uri=reference.uri)
for (s1, t1), (s2, t2) in reference.co_iter(reference):
l1 = reference[s1, t1]
l2 = reference[s2, t2]
if l1 == l2:
continue
overlap.add(s1 & s2)
return overlap.support().to_annotation()

http://pyannote.github.io/pyannote-metrics/reference.html#pyannote.metrics.detection.DetectionPrecisionRecallFMeasure

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants