feat(speaker): CAM++ speaker-embedding backend (CoreML)#652
Conversation
CoreML CAM++ from FluidInference/campplus-coreml: 2-stage (fbank80 preprocessor fp32/CPU -> CAM++ RangeDim -> 192-d L2-normalized embedding). Dynamic time dim (RangeDim, CPU/GPU; tiny model) avoids padding corrupting the stats-pooled embedding. - ModelNames: campPlus Repo + CampPlus registry - Speaker/: CampPlusModels, CampPlusEmbedder (audio -> embedding, cosine) - CLI: campplus-embed (one file -> embedding; two -> speaker-verification cosine) Verified: same-speaker cosine 0.74 vs different 0.35 on the example pairs.
PocketTTS Smoke Test ✅
Runtime: 0m22s 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. |
Parakeet EOU Benchmark Results ✅Status: Benchmark passed Performance Metrics
Streaming Metrics
Test runtime: 1m20s • 05/31/2026, 10:47 PM EST RTFx = Real-Time Factor (higher is better) • Processing includes: Model inference, audio preprocessing, state management, and file I/O |
Qwen3-ASR int8 Smoke Test ✅
Performance Metrics
Runtime: 4m0s Note: CI VM lacks physical GPU — CoreML MLState (macOS 15) KV cache produces degraded results on virtualized runners. On Apple Silicon: ~1.3% WER / 2.5x RTFx. |
ASR Benchmark Results ✅Status: All benchmarks passed Parakeet v3 (multilingual)
Parakeet v2 (English-optimized)
Streaming (v3)
Streaming (v2)
Streaming tests use 5 files with 0.5s chunks to simulate real-time audio streaming 25 files per dataset • Test runtime: 8m16s • 05/31/2026, 10:57 PM EST RTFx = Real-Time Factor (higher is better) • Calculated as: Total audio duration ÷ Total processing time Expected RTFx Performance on Physical M1 Hardware:• M1 Mac: ~28x (clean), ~25x (other) Testing methodology follows HuggingFace Open ASR Leaderboard |
Offline VBx Pipeline ResultsSpeaker Diarization Performance (VBx Batch Mode)Optimal clustering with Hungarian algorithm for maximum accuracy
Offline VBx Pipeline Timing BreakdownTime spent in each stage of batch diarization
Speaker Diarization Research ComparisonOffline VBx achieves competitive accuracy with batch processing
Pipeline Details:
🎯 Offline VBx Test • AMI Corpus ES2004a • 1049.0s meeting audio • 96.7s processing • Test runtime: 1m 44s • 05/31/2026, 10:44 PM EST |
Sortformer High-Latency Benchmark ResultsES2004a Performance (30.4s latency config)
Sortformer High-Latency • ES2004a • Runtime: 2m 26s • 2026-06-01T02:54:36.599Z |
Speaker Diarization Benchmark ResultsSpeaker Diarization PerformanceEvaluating "who spoke when" detection accuracy
Diarization Pipeline Timing BreakdownTime spent in each stage of speaker diarization
Speaker Diarization Research ComparisonResearch baselines typically achieve 18-30% DER on standard datasets
Note: RTFx shown above is from GitHub Actions runner. On Apple Silicon with ANE:
🎯 Speaker Diarization Test • AMI Corpus ES2004a • 1049.0s meeting audio • 52.7s diarization time • Test runtime: 3m 19s • 05/31/2026, 10:49 PM EST |
VAD Benchmark ResultsPerformance Comparison
Dataset Details
✅: Average F1-Score above 70% |
# Conflicts: # Sources/FluidAudio/ModelNames.swift
Summary
Adds CAM++ (FunASR, ~7.2M) as a CoreML speaker-embedding extractor for speaker verification / diarization clustering. Model:
FluidInference/campplus-coreml.Pipeline
CAM++ uses a dynamic time dim (RangeDim) so it runs on variable-length audio without padding (padding would corrupt the statistics-pooled embedding). The ANE compiler rejects RangeDim, so it runs on CPU/GPU — fine for a 7.2M model.
Changes
ModelNames:campPlusRepo+CampPlusregistrySources/FluidAudio/Speaker/:CampPlusModels(download/load),CampPlusEmbedder(audio → 192-d embedding + cosine)campplus-embed <a.wav> [b.wav](embedding, or speaker-verification cosine)Verification
End-to-end on M5 Pro:
Clear separation. CoreML↔torch embedding cosine 0.9997–0.99999.
Notes
Diarizerembedding extractor — lands as an alternative.