CoolFace
Modelpublic

aufklarer/SpeechBrain-ECAPA-VoxCeleb-20M-MLX

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes20downloads
Model Card

SpeechBrain ECAPA VoxCeleb MLX

This is a reproducible MLX weight export of `speechbrain/spkrec-ecapa-voxceleb` for native Apple Silicon inference. It produces a 192-dimensional, L2-normalized voice embedding for cosine-similarity speaker comparison.

Model

PropertyValue
Parameters20.77 million
WeightsSafetensors, FLOAT16
Weight size39.7 MiB
InputSpeechBrain log-mel [1, frames, 80]
Sample rate16 kHz
Output192-dimensional L2-normalized embedding

Files

FileDescription
model.safetensorsMLX-layout ECAPA weights
mlx_model.pyNative MLX ECAPA graph
frontend.pyReproducible SpeechBrain log-mel frontend
config.jsonArchitecture, frontend, source revision, and checksums
artifact_manifest.jsonSHA-256 and size of every artifact file
validation.jsonPyTorch/MLX parity and local latency measurements
requirements.txtPinned standalone runtime dependencies
LICENSEApache 2.0 license

Validation

CheckResult
Minimum PyTorch/MLX output cosine0.999999
Maximum absolute error0.000372
Warm local inference5.2 ms

The source model reports 0.80% equal-error rate on cleaned VoxCeleb1. Run a fresh VoxCeleb1-O evaluation before treating that upstream score as conversion parity or changing a production threshold.

Usage

python
import mlx.core as mx
import soundfile as sf

from frontend import compute_fbank
from mlx_model import SpeakerModel

audio, sample_rate = sf.read("voice.wav", dtype="float32")
assert sample_rate == 16000 and audio.ndim == 1
features = compute_fbank(audio, 80)[None, :, :]
model = SpeakerModel()
model.load_weights(list(mx.load("model.safetensors").items()), strict=True)
embedding = model(mx.array(features))
mx.eval(embedding)
print(embedding.shape, float(mx.linalg.norm(embedding).item()))

The exact frontend contract is in config.json. Speaker embeddings are not secure authentication and should not be used alone for access control.

Source

Converted from the official SpeechBrain checkpoint at revision 0f99f2d0ebe89ac095bcc5903c4dd8f72b367286. The original checkpoint and graph revisions are pinned in config.json.

Links