Skip to content

fix(benchmark): fail loudly on missing AMI annotations instead of scoring placeholder ground truth#754

Merged
Alex-Wengg merged 2 commits into
mainfrom
fix/752-fail-loudly-missing-ami-annotations
Jul 4, 2026
Merged

fix(benchmark): fail loudly on missing AMI annotations instead of scoring placeholder ground truth#754
Alex-Wengg merged 2 commits into
mainfrom
fix/752-fail-loudly-missing-ami-annotations

Conversation

@Alex-Wengg

Copy link
Copy Markdown
Member

Closes #752

Root cause of the 80.8% DER report

The 80.8% DER / 80.9% JER on PR #744's CI run was not a diarizer regression. From that run's logs:

[ERROR] [FluidAudio.Dataset]  Failed to download AMI annotations      ← Edinburgh server flake (×2)
[WARN]  [FluidAudio.AMIParser] 📋 Using simplified placeholder ground truth (causes poor DER performance)
[INFO]  DER: 80.8%   JER: 80.9%   Speakers: 4 detected / 4 truth

The pipeline itself was healthy (4/4 speakers, normal stage timings, normal speaker mapping). The AMI annotation download from groups.inf.ed.ac.uk transiently failed, AMIParser silently substituted a synthetic placeholder reference (8 evenly-sliced round-robin segments), and the benchmark scored real diarization output against fake ground truth — then posted the result as if genuine.

Supporting evidence it was a one-off harness artifact:

Changes

  • AMIParser: remove the placeholder ground-truth fallbacks. Search-based loaders now throw AMIParserError.annotationsNotFound (or propagate parse errors) instead of returning generateSimplifiedGroundTruth output — benchmarks can no longer silently score against fake data. generateSimplifiedGroundTruth is deleted; the loaders become synchronous throwing functions.
  • DiarizationBenchmark: exit(1) when no meeting produced a result, so CI goes red instead of exiting 0 with empty metrics.
  • DatasetDownloader: retry the annotation zip download (3 attempts with backoff).
  • Workflows (diarizer-benchmark, offline-pipeline, sortformer-benchmark): cache Datasets/ami_public_1.6.2 so the flaky Edinburgh server is only hit on cache miss; only post the PR benchmark comment when metric extraction succeeded (previously if: always(), which would post garbage numbers on failure).
  • Tests: new AMIParserTests cases covering the throwing behavior via injectable search roots.

Verification

  • Without annotations: benchmark logs annotationsNotFound(subdirectory: "segments"), writes no results file, exits 1
  • With annotations: DER 15.1% / JER 24.8% on ES2004a — exactly the healthy CI baseline

Also: Documentation/Benchmarks.md re-run (second commit)

All diarization tables re-measured 2026-07-03 on an Apple M5 Pro against the official AMI-SDM 16-meeting split:

  • Offline: 10.6% avg DER with --threshold 0.7, bit-identical across consecutive runs, reproducing the existing table exactly. Documented that feat(cli): expose all unexposed config fields across 6 commands #616 changed the effective CLI default clustering threshold from 0.7 to 0.6 (community-1 preset), which undercounts speakers on 4 meetings (e.g. EN2002a 2/4 → 41.9% DER) and yields 15.5% avg on this split — the documented command now pins --threshold 0.7.
  • Streaming: all four configs re-run on the official 16-meeting split (previous tables used an easier 7-meeting subset): 10s/0s 38.2%, 5s/0s 39.0%, 3s/1s 53.3%, 5s/2s 55.9% avg DER. No-overlap configs beat overlap configs; "best configuration" label moved to 10s/0s.
  • Noted a latent issue (not fixed here): running many overlapping-chunk meetings in one process crashes with E5RT: Failed to allocate memory IOSurface object (SIGABRT in MLE5Engine) — the overlap tables were measured one meeting per process.

🤖 Generated with Claude Code

…of scoring placeholder ground truth (#752)

The 80.8% DER reported on PR #744 was not a diarizer regression: the AMI
annotation download from groups.inf.ed.ac.uk transiently failed in that CI
run, AMIParser silently fell back to a synthetic placeholder reference
(8 evenly-sliced round-robin segments), and the benchmark scored real
diarization output against fake ground truth. The pipeline itself was
healthy (4/4 speakers, normal timings); every surrounding run scored 15.1%.

Changes:
- AMIParser: remove the placeholder ground-truth fallbacks; the search-based
  loaders now throw AMIParserError.annotationsNotFound (or propagate parse
  errors) instead of returning generateSimplifiedGroundTruth output. Loaders
  become synchronous throwing functions; generateSimplifiedGroundTruth is
  deleted.
- DiarizationBenchmark: exit(1) when no meeting produced a result so CI goes
  red instead of exiting 0 with empty metrics.
- DatasetDownloader: retry the annotation zip download (3 attempts, backoff).
- Workflows: cache Datasets/ami_public_1.6.2 in diarizer-benchmark,
  offline-pipeline, and sortformer-benchmark so the flaky Edinburgh server is
  only needed on cache miss; only post the PR benchmark comment when metric
  extraction succeeded.
- Tests: cover the new throwing behavior via injectable search roots.

Verified locally: without annotations the benchmark logs
annotationsNotFound and exits 1 with no results file; with annotations it
reproduces the healthy baseline (DER 15.1%, JER 24.8% on ES2004a).
…6-meeting split

Offline: unchanged at 10.6% avg DER with --threshold 0.7 (bit-identical
across runs; reproduces the #533-era table exactly). Documented that the
CLI default clustering threshold changed from 0.7 to 0.6 (community-1
preset) in #616, which undercounts speakers on 4 meetings and yields
15.5% avg DER on this split — the table now pins --threshold 0.7.

Streaming: all four configs re-run on the official 16-meeting split
(previous tables used a 7-meeting subset). No-overlap configs beat
overlap configs: 10s/0s 38.2%, 5s/0s 39.0%, 3s/1s 53.3%, 5s/2s 55.9%
avg DER. Noted the IOSurface/E5RT buffer exhaustion when running many
overlapping-chunk meetings in one process.

Hardware: Apple M5 Pro, 2026-07-03. Also fixed missing line
continuations in the documented streaming commands.
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Supertonic3 Smoke Test ✅

Check Result
Build
Model download (incl. VectorEstimatorVariants/ int4 buckets)
Model load
Synthesis pipeline (--ve-variant int4)
Output WAV ✅ (364.7 KB)

Runtime: 0m23s

Note: CI VMs lack a physical Neural Engine; the ANE-bucketed VectorEstimator falls back to CPU here. This validates download + variant resolution + synthesis, not ANE residency/perf.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

PocketTTS Smoke Test ✅

Check Result
Build
Model download
Model load
Synthesis pipeline
Output WAV ✅ (146.3 KB)

Runtime: 1m34s

Note: PocketTTS uses CoreML MLState (macOS 15) KV cache + Mimi streaming state. CI VM lacks physical GPU — audio quality and performance may differ from Apple Silicon.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Sortformer High-Latency Benchmark Results

ES2004a Performance (30.4s latency config)

Metric Value Target Status
DER 30.3% <35%
Miss Rate 28.2% - -
False Alarm 0.9% - -
Speaker Error 1.2% - -
RTFx 22.4x >1.0x
Speakers 4/4 - -

Sortformer High-Latency • ES2004a • Runtime: 2m 38s • 2026-07-04T03:19:52.402Z

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Parakeet EOU Benchmark Results ✅

Status: Benchmark passed
Chunk Size: 320ms
Files Tested: 100/100

Performance Metrics

Metric Value Description
WER (Avg) 7.03% Average Word Error Rate
WER (Med) 4.17% Median Word Error Rate
RTFx 7.11x Real-time factor (higher = faster)
Total Audio 470.6s Total audio duration processed
Total Time 69.9s Total processing time

Streaming Metrics

Metric Value Description
Avg Chunk Time 0.070s Average chunk processing time
Max Chunk Time 0.140s Maximum chunk processing time
EOU Detections 0 Total End-of-Utterance detections

Test runtime: 2m8s • 07/03/2026, 11:20 PM EST

RTFx = Real-Time Factor (higher is better) • Processing includes: Model inference, audio preprocessing, state management, and file I/O

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

VAD Benchmark Results

Performance Comparison

Dataset Accuracy Precision Recall F1-Score RTFx Files
MUSAN 92.0% 86.2% 100.0% 92.6% 709.1x faster 50
VOiCES 92.0% 86.2% 100.0% 92.6% 763.2x faster 50

Dataset Details

  • MUSAN: Music, Speech, and Noise dataset - standard VAD evaluation
  • VOiCES: Voices Obscured in Complex Environmental Settings - tests robustness in real-world conditions

✅: Average F1-Score above 70%

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

ASR Benchmark Results ✅

Status: All benchmarks passed

Parakeet v3 (multilingual)

Dataset WER Avg WER Med RTFx Status
test-clean 0.57% 0.00% 5.42x
test-other 1.19% 0.00% 3.64x

Parakeet v2 (English-optimized)

Dataset WER Avg WER Med RTFx Status
test-clean 0.80% 0.00% 5.68x
test-other 1.00% 0.00% 3.69x

Streaming (v3)

Metric Value Description
WER 0.00% Word Error Rate in streaming mode
RTFx 0.66x Streaming real-time factor
Avg Chunk Time 1.377s Average time to process each chunk
Max Chunk Time 1.479s Maximum chunk processing time
First Token 1.659s Latency to first transcription token
Total Chunks 31 Number of chunks processed

Streaming (v2)

Metric Value Description
WER 0.00% Word Error Rate in streaming mode
RTFx 0.65x Streaming real-time factor
Avg Chunk Time 1.381s Average time to process each chunk
Max Chunk Time 1.462s Maximum chunk processing time
First Token 1.375s Latency to first transcription token
Total Chunks 31 Number of chunks processed

Streaming tests use 5 files with 0.5s chunks to simulate real-time audio streaming

25 files per dataset • Test runtime: 10m11s • 07/03/2026, 11:26 PM EST

RTFx = Real-Time Factor (higher is better) • Calculated as: Total audio duration ÷ Total processing time
Processing time includes: Model inference on Apple Neural Engine, audio preprocessing, state resets between files, token-to-text conversion, and file I/O
Example: RTFx of 2.0x means 10 seconds of audio processed in 5 seconds (2x faster than real-time)

Expected RTFx Performance on Physical M1 Hardware:

• M1 Mac: ~28x (clean), ~25x (other)
• CI shows ~0.5-3x due to virtualization limitations

Testing methodology follows HuggingFace Open ASR Leaderboard

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Offline VBx Pipeline Results

Speaker Diarization Performance (VBx Batch Mode)

Optimal clustering with Hungarian algorithm for maximum accuracy

Metric Value Target Status Description
DER 10.4% <20% Diarization Error Rate (lower is better)
RTFx 11.29x >1.0x Real-Time Factor (higher is faster)

Offline VBx Pipeline Timing Breakdown

Time spent in each stage of batch diarization

Stage Time (s) % Description
Model Download 15.672 16.9 Fetching diarization models
Model Compile 6.717 7.2 CoreML compilation
Audio Load 0.151 0.2 Loading audio file
Segmentation 24.993 26.9 VAD + speech detection
Embedding 92.674 99.7 Speaker embedding extraction
Clustering (VBx) 0.102 0.1 Hungarian algorithm + VBx clustering
Total 92.973 100 Full VBx pipeline

Speaker Diarization Research Comparison

Offline VBx achieves competitive accuracy with batch processing

Method DER Mode Description
FluidAudio (Offline) 10.4% VBx Batch On-device CoreML with optimal clustering
FluidAudio (Streaming) 17.7% Chunk-based First-occurrence speaker mapping
Research baseline 18-30% Various Standard dataset performance

Pipeline Details:

  • Mode: Offline VBx with Hungarian algorithm for optimal speaker-to-cluster assignment
  • Segmentation: VAD-based voice activity detection
  • Embeddings: WeSpeaker-compatible speaker embeddings
  • Clustering: PowerSet with VBx refinement
  • Accuracy: Higher than streaming due to optimal post-hoc mapping

🎯 Offline VBx Test • AMI Corpus ES2004a • 1049.0s meeting audio • 117.8s processing • Test runtime: 2m 2s • 07/03/2026, 11:31 PM EST

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Speaker Diarization Benchmark Results

Speaker Diarization Performance

Evaluating "who spoke when" detection accuracy

Metric Value Target Status Description
DER 15.1% <30% Diarization Error Rate (lower is better)
JER 24.9% <25% Jaccard Error Rate
RTFx 31.93x >1.0x Real-Time Factor (higher is faster)

Diarization Pipeline Timing Breakdown

Time spent in each stage of speaker diarization

Stage Time (s) % Description
Model Download 9.746 29.7 Fetching diarization models
Model Compile 4.177 12.7 CoreML compilation
Audio Load 0.032 0.1 Loading audio file
Segmentation 9.857 30.0 Detecting speech regions
Embedding 16.428 50.0 Extracting speaker voices
Clustering 6.571 20.0 Grouping same speakers
Total 32.868 100 Full pipeline

Speaker Diarization Research Comparison

Research baselines typically achieve 18-30% DER on standard datasets

Method DER Notes
FluidAudio 15.1% On-device CoreML
Research baseline 18-30% Standard dataset performance

Note: RTFx shown above is from GitHub Actions runner. On Apple Silicon with ANE:

  • M2 MacBook Air (2022): Runs at 150 RTFx real-time
  • Performance scales with Apple Neural Engine capabilities

🎯 Speaker Diarization Test • AMI Corpus ES2004a • 1049.0s meeting audio • 32.9s diarization time • Test runtime: 2m 12s • 07/03/2026, 11:32 PM EST

@Alex-Wengg Alex-Wengg merged commit 82aed2a into main Jul 4, 2026
11 checks passed
@Alex-Wengg Alex-Wengg deleted the fix/752-fail-loudly-missing-ami-annotations branch July 4, 2026 03:43
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.

Diarization benchmark reports 80.8% DER on AMI ES2004a (target <30%)

1 participant