Closed alecristia closed 3 years ago
Yes. No need to create an RTTM file.
from pyannote.core import Segment, Annotation
manual_reference = Annotation()
for onset, offset, speaker in ...:
manual_reference[Segment(onset, offset)] = speaker
automatic_hypothesis = Annotation()
for onset, offset, speaker in ...:
automatic_hypothesis[Segment(onset, offset)] = speaker
from pyannote.metrics.identification import IdentificationErrorRate
metric = IdentificationErrorRate()
error_rate = metric(manual_reference, automatic_hypothesis)
print(error_rate)
Description
We're working on calling pyannote.metrics (specifically, to get identification error rate) from within R (package tutorial), so we are hoping to use as few python packages & other adaptations as possible. Our annotations are in a csv, which contains the following info for each annotated segment:
Is it truly necessary to create rttm-like files? Or could we hack in as in the code stub below?
Steps/Code to Reproduce
This code doesn't run, it is just a stub of what the code would look like:
Thanks in advance!