Expand description
Diarization Error Rate (DER) and word-level attribution metrics.
Frame-based DER with forgiveness collar and optimal speaker mapping, plus WDER (Word Diarization Error Rate) for who-said-what evaluation.
Structs§
- DerDecomposition
- Overlap-aware DER decomposition: the headline DER plus single-speaker- and overlap-region DERs and per-speaker recall.
- DerResult
- DER evaluation result.
- Speaker
Recall - Per-speaker recall: how much of one reference speaker’s speech the mapped hypothesis speaker recovered.
- Wder
Result - Word Diarization Error Rate (WDER) result.
Functions§
- compute_
der - { collar >= 0.0 } pub fn compute_der( reference: &SpeakerTurn, hypothesis: &SpeakerTurn, collar: f64, ) -> DerResult { ret.der >= 0.0 && ret.der <= 1.0 } Compute DER between reference and hypothesis annotations.
- compute_
der_ decomposition - { collar >= 0.0 }
pub fn compute_der_decomposition( reference: &SpeakerTurn, hypothesis: &SpeakerTurn, collar: f64, ) -> DerDecomposition
{ ret.total.der >= 0.0 && ret.total.der <= 1.0 }
Compute the overlap-aware DER decomposition (total / single-speaker / overlap
DER + per-speaker recall) in one call. Intended for bench artifacts and the
long-form AMI gate; the headline path stays on
super::compute_der. - compute_
der_ from_ rttm - { collar >= 0.0 } pub fn compute_der_from_rttm( reference: &[(f64, f64, &str)], hypothesis: &SpeakerTurn, collar: f64, ) -> DerResult { ret.der >= 0.0 && ret.der <= 1.0 } Convenience: compute DER from RTTM segments (string speaker labels).
- compute_
der_ single_ speaker_ regions - { collar >= 0.0 } pub fn compute_der_single_speaker_regions( reference: &SpeakerTurn, hypothesis: &SpeakerTurn, collar: f64, ) -> DerResult { ret.der >= 0.0 && ret.der <= 1.0 } Overlap-excluded DER: DER computed only over reference frames where exactly ONE speaker is active.
- compute_
der_ with_ uem - { collar >= 0.0 } pub fn compute_der_with_uem( reference: &SpeakerTurn, hypothesis: &SpeakerTurn, collar: f64, scored: &TimeRange, ) -> DerResult { ret.der >= 0.0 && ret.der <= 1.0 } DER restricted to the UEM (Un-partitioned Evaluation Map) scored regions.
- compute_
wder - { true } pub fn compute_wder( reference: &WordAlignment, hypothesis: &WordAlignment, ) -> WderResult { ret.wder >= 0.0 && ret.wder <= 1.0 } Compute Word Diarization Error Rate between reference and hypothesis word alignments.
- parse_
uem - Parse a UEM (Un-partitioned Evaluation Map) file body into per-file scored
regions, keyed by file id. Lines are
<file-id> <channel> <start> <end>; blank lines and;/#comments are skipped, and malformed/degenerate lines are ignored. Pure-Rust and wasm-clean — callers read the file and pass the text here, then feed the per-fileVec<TimeRange>tocompute_der_with_uem.