Downloads · 30 days
0
DimQ1/sortformer-4spk-v2-onnx-fp32-cpu
sortformer-4spk-v2-onnx-fp32-cpu is a audio classification model from DimQ1. Use it for the audio classification task on the model card, and read the license before you ship it in a product. It is set up for onnxruntime. The card lists the license as cc-by-4.0.
FP32 ONNX export of NVIDIA's Sortformer 4spk-v2 speaker diarization model for CPU inference via ONNX Runtime.
Downloads · 30 days
0
Access
Public
Updated Jul 12, 2026
Repo size
492 MB
Likes
0
Public
Click a slice to open those files.
.onnx492 MB · 100%
From the Hugging Face model README
FP32 ONNX export of NVIDIA's Sortformer 4spk-v2 speaker diarization model for CPU inference via ONNX Runtime.
processed_signal — log-mel spectrogram [B, 128, mel_frames]speaker_logits — per-frame sigmoid probabilities [B, diar_frames, 4]Audio (16 kHz mono) → STFT → 128 mel bins
→ ConformerEncoder (17 layers, d=512)
→ SortformerModules (4 speakers)
→ TransformerEncoder (18 layers, d=192)
→ Sigmoid → [B, diar_frames, 4] speaker logits
| Metric | Value |
|---|---|
| RTF | 0.037 (27× real-time) |
| DER | 17.82% (LibriCSS test set) |
| Size | 469 MB |
Benchmarked on 100-file LibriCSS subset (1954.8 s audio). ORT 1.27.1 with ORT_PARALLEL + memory optimizations.
| Variant | Size | DER | RTF | Link |
|---|---|---|---|---|
| INT8 | 129 MB | 21.64% | 0.034 | sortformer-4spk-v2-onnx-int8-cpu |
| INT4 | 135 MB | 19.11% | 0.043 | sortformer-4spk-v2-onnx-int4-cpu |
Before inference, convert raw 16 kHz mono audio to log-mel spectrogram:
import onnxruntime as ort
import numpy as np
session = ort.InferenceSession("sortformer.onnx", providers=["CPUExecutionProvider"])
# mel: log-mel spectrogram [1, 128, mel_frames]
mel = np.random.randn(1, 128, 500).astype(np.float32) # 5s @ 10ms stride
speaker_logits = session.run(None, {"processed_signal": mel})[0]
# shape: [1, 63, 4]
using var session = new InferenceSession("sortformer.onnx");
var inputs = new List<NamedOnnxValue>
{
NamedOnnxValue.CreateFromTensor("processed_signal", melTensor),
};
using var results = session.Run(inputs);
var logits = results.First().AsTensor<float>();
// logits shape: [1, diar_frames, 4]
Exported from NeMo to ONNX (opset 21) using DiarizationConverter:
python scripts/export_fp32_opset21.py