Dev.to
7/5/2026

Grouping Utterances by Speaker with ECAPA-TDNN and ONNX Runtime
Short summary
Tutorial on speaker diarization using ECAPA-TDNN to generate 192-dimensional speaker embeddings, then grouping utterances by cosine similarity (0.45 threshold) with ONNX Runtime. On a 14-second two-speaker test, the method achieved perfect speaker grouping with clear similarity separation (same-speaker: 0.453–0.595, different-speaker: 0.095–0.276) and CPU-only real-time performance.
- •Generate 192-dimensional speaker embeddings using ECAPA-TDNN with ONNX Runtime
- •Group utterances sequentially via cosine similarity without knowing speaker count in advance
- •Achieved correct speaker separation with non-overlapping similarity ranges and sub-real-time CPU execution
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



