sentis-redimnet2

ReDimNet2 speaker embedding (B0 / B1, VoxCeleb2) converted to Unity Inference Engine (Sentis) FP32.

Files

redimnet2_b0_fp32.sentis   # ReDimNet2-B0: waveform [1, 48000] -> 192-d (1.1M params)
redimnet2_b1_fp32.sentis   # ReDimNet2-B1: waveform [1, 48000] -> 192-d (2.1M params)
ReDimNet2.cs               # self-contained Unity Sentis inference

Inference

Each graph takes raw 16 kHz mono audio: the ReDimNet2 TF-style front-end (signal normalization, preemphasis, DFT implemented as conv1d, 72 mel bands, log) was exported inside the graph, so no C# feature code is needed. ReDimNet2 splits longer audio into 3 s windows with a 1.5 s hop (shorter audio is wrap-padded) and averages the L2-normalized window embeddings. Two utterances are compared by cosine similarity (a dot product, since embeddings are normalized); the nested ReDimNet2.Voiceprints keeps one averaged prototype per enrolled speaker.

A complete self-contained implementation lives in ReDimNet2.cs (windowing, sync + async readback, enrollment/identification). Minimal usage:

var model = new ReDimNet2(BackendType.CPU);
model.Load(modelRoot, ReDimNet2.Variant.B1); // or Variant.B0; folder holding the .sentis files
model.Warmup();

var voiceprints = new ReDimNet2.Voiceprints(threshold: 0.5f);
voiceprints.Enroll("alice", model.Embed(aliceSamples));   // 16 kHz mono float[] in [-1, 1]
voiceprints.Enroll("alice", model.Embed(aliceSamples2));  // 2-5 utterances per speaker work best

var match = voiceprints.Identify(model.Embed(unknownSamples));
// match.Speaker == null when the best cosine is below the threshold (unknown speaker)

Run one embedding per finished utterance (e.g. after a VAD end-of-speech event), not per frame. For a GPU backend use EmbedAsync; a synchronous GPU readback can stall on some mobile GPUs. Thresholds are model-specific: calibrate on your own enrollment / impostor recordings (0.5 is a starting point).

Conversion notes

  • Source: official PalabraAI/redimnet2 v1.0.0 checkpoints b0-vox2-lm.pt, b1-vox2-lm.pt (VoxCeleb2, large-margin fine-tuned).
  • Exported with torch.onnx.export as the full model (front-end + backbone + pooling + head) at a fixed [1, 48000] waveform input, simplified with onnxsim.
  • ONNX Runtime output matches the PyTorch model (cosine 1.000000) on real speech; Unity Sentis (CPU) output matches as well (cosine 1.000000).

Upstream VoxCeleb1-O (cleaned) EER: B0 1.04 %, B1 0.78 % (PalabraAI/redimnet2 README).

License & attribution

MIT. Converted from PalabraAI/redimnet2 (MIT, Copyright (c) 2026 Palabra.ai). Paper: ReDimNet2: Scaling Speaker Verification via Time-Pooled Dimension Reshaping.

Downloads last month
15
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for Sky-Kim/com.sky.sentis.redimnet2