mirror of
https://github.com/pyannote/pyannote-audio.git
synced 2026-11-20 13:07:51 +09:00
fix: add support for when "annotation" key exists but is None
This commit is contained in:
1 parent
212db34bc8
commit
b8d623596e
1 file changed
+2
-2
@@ -628,14 +628,14 @@ def apply_pretrained(
|
||||
pipeline.write_rttm(fp, hypothesis)
|
||||
|
||||
# compute evaluation metric (when possible)
|
||||
if "annotation" not in current_file:
|
||||
reference = current_file.get("annotation", None)
|
||||
if reference is None:
|
||||
metric = None
|
||||
|
||||
# compute evaluation metric (when available)
|
||||
if metric is None:
|
||||
continue
|
||||
|
||||
reference = current_file["annotation"]
|
||||
uem = get_annotated(current_file)
|
||||
_ = metric(reference, hypothesis, uem=uem)
|
||||
|
||||
|
||||
Reference in new issue
Block a user