SAVRN
Search Contact SAVRN

Open-weight model · Audio classification

WeSpeaker-ResNet34-LM-MLX

by Ivan aufklarer/WeSpeaker-ResNet34-LM-MLX

MLX-compatible weights for WeSpeaker ResNet34-LM, converted from the pyannote speaker embedding model with BatchNorm fused into Conv2d.

Parameters7M
Context
Weights26.5 MB
Licensemit
AccessOpen weights
Monthly Downloads26.6k

Runs On

What it takes to serve WeSpeaker-ResNet34-LM-MLX (7M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Ivan, published under mit, revision 26499ce11ad1.

MLX-compatible weights for WeSpeaker ResNet34-LM, converted from the pyannote speaker embedding model with BatchNorm fused into Conv2d. WeSpeaker ResNet34-LM is a speaker embedding model (~6.6M params) that produces 256-dimensional L2-normalized speaker embeddings from audio. Trained on VoxCeleb for speaker verification and diarization. BatchNorm is fused into Conv2d at conversion time — no BN layers in the MLX model. Part of speech-swift. Converts the original pyannote/wespeaker-voxceleb-resnet34-LM checkpoint using a custom unpickler (no pyannote.audio dependency required). Key transformations: - Fuse BatchNorm into Conv2d: wfused = w × γ/√(σ²+ε), bfused = β − μ×γ/√(σ²+ε) - Transpose…

Read Ivan's full model card

MLX-compatible weights for WeSpeaker ResNet34-LM, converted from the pyannote speaker embedding model with BatchNorm fused into Conv2d.

Model

WeSpeaker ResNet34-LM is a speaker embedding model (~6.6M params) that produces 256-dimensional L2-normalized speaker embeddings from audio. Trained on VoxCeleb for speaker verification and diarization.

Architecture:

Input: [B, T, 80, 1] log-mel spectrogram (80 fbank, 16kHz)
  │
  ├─ Conv2d(1→32, k=3, p=1) + ReLU
  ├─ Layer1: 3× BasicBlock(32→32)
  ├─ Layer2: 4× BasicBlock(32→64, stride=2)
  ├─ Layer3: 6× BasicBlock(64→128, stride=2)
  ├─ Layer4: 3× BasicBlock(128→256, stride=2)
  │
  ├─ Statistics Pooling: mean + std → [B, 5120]
  ├─ Linear(5120→256) → L2 normalize
  │
  Output: [B, 256] speaker embedding

BatchNorm is fused into Conv2d at conversion time — no BN layers in the MLX model.

Usage (Swift / MLX)

import SpeechVAD

// Speaker embedding
let model = try await WeSpeakerModel.fromPretrained()
let embedding = model.embed(audio: samples, sampleRate: 16000)
// embedding: [Float] of length 256, L2-normalized

// Compare speakers
let similarity = WeSpeakerModel.cosineSimilarity(embeddingA, embeddingB)

// Full speaker diarization pipeline
let pipeline = try await DiarizationPipeline.fromPretrained()
let result = pipeline.diarize(audio: samples, sampleRate: 16000)
for seg in result.segments {
    print("Speaker \(seg.speakerId): \(seg.startTime)s - \(seg.endTime)s")
}

Part of speech-swift.

Conversion

python3 scripts/convert_wespeaker.py --upload

Converts the original pyannote/wespeaker-voxceleb-resnet34-LM checkpoint using a custom unpickler (no pyannote.audio dependency required). Key transformations:

  • Fuse BatchNorm into Conv2d: w_fused = w × γ/√(σ²+ε), b_fused = β − μ×γ/√(σ²+ε)
  • Transpose Conv2d weights: [O, I, H, W][O, H, W, I] for MLX channels-last
  • Rename: strip resnet. prefix, seg_1embedding
  • Drop num_batches_tracked keys

Weight Mapping

PyTorch Key MLX Key Shape
resnet.conv1.weight + resnet.bn1.* conv1.weight [32, 3, 3, 1]
resnet.layer{L}.{B}.conv{1,2}.weight + bn{1,2}.* layer{L}.{B}.conv{1,2}.weight [O, 3, 3, I]
resnet.layer{L}.0.shortcut.0.weight + shortcut.1.* layer{L}.0.shortcut.weight [O, 1, 1, I]
resnet.seg_1.weight embedding.weight [256, 5120]
resnet.seg_1.bias embedding.bias [256]

License

The original WeSpeaker model is released under the MIT License.



Configuration

Model type
wespeaker-resnet34-lm

Identity and Version

Repository
aufklarer/WeSpeaker-ResNet34-LM-MLX
Publisher
Ivan
Task
Audio classification
Modality
Audio
Library
mlx
Parameters
7M parameters
Languages
mlx
Revision
26499ce11ad1b48ac96aacc8d6fa433f941bdc96
First published
2026-02-25
Last updated
2026-04-12

Files and Weights

4 files, 26.5 MB in total. The weights are 1 file totalling 26.5 MB in safetensors.

Weights1 file · 26.5 MB
Configuration1 file · 237 B
Documentation1 file · 3.3 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights26.5 MB f56204883f2d
config.jsonConfiguration237 B
README.mdDocumentation3.3 KB
.gitattributesRepository1.5 KB

License and Download

License
mit
Access
Open weights, no gate
Download size
26.5 MB
Download from Ivan

Released by Ivan through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published26.5 MB
16-bit0.0 GB
8-bit0.0 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About WeSpeaker-ResNet34-LM-MLX

How much GPU memory does WeSpeaker-ResNet34-LM-MLX need?

About 0 GB at 16-bit and 0 GB at 4-bit: the weights (7M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run WeSpeaker-ResNet34-LM-MLX on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use WeSpeaker-ResNet34-LM-MLX commercially?

Yes. WeSpeaker-ResNet34-LM-MLX is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

Similar Models

Model · Audio classification

ced-mini

Speech Team, Xiaomi MiLM Plus

CED are simple ViT-Transformer-based models for audio tagging, achieving sota performance on Audioset. Notable differences from other available models include: 1. Simplification for finetuning: Batchnormalization of Mel-Spectrograms. During finetuning one does not need to first compute mean/variance over the dataset, which is common for AST. 1. Support for variable length inputs. Most other models use a static time-frequency position embedding, which hinders the model's generalization to segments shorter than 10s. Many previous transformers simply pad their input to 10s in order to avoid the performance impact, which in turn slows down training/inference drastically. 1. Training/Inference…

Open weights apache-2.0 10M parameters transformers

Model · Audio classification

Silero-VAD-v6.2.1-MLX

Ivan

MLX port of snakers4/silero-vad tag v6.2.1 for voice activity detection on Apple Silicon. Measured with speech-swift release tests on Apple Silicon using a 20 s 16 kHz speech fixture, 625 streaming chunks. Parity against the matching CoreML v6.2.1 export: The exported safetensors were also checked tensor-by-tensor against the upstream v6.2.1 JIT state dict after conversion; the maximum absolute tensor difference was 0. Converted from snakers4/silero-vad tag v6.2.1. The upstream project is MIT licensed. - speech-swift - Apple SDK - Docs - install and CLI docs - soniqo.audio - website - blog - blog

Open weights mit 309,121 parameters mlx

Model · Audio classification

ced-gguf

Mudler

GGUF quantizations of the CED family (Consistent Ensemble Distillation, Xiaomi) - SOTA-tier audio-tagging models that classify everyday sounds (baby cry, footsteps, glass breaking, alarms, dog bark,...) into the 527-class AudioSet ontology. These files run with ced.cpp, a standalone C++/ggml port (no Python, no PyTorch at inference), and with LocalAI via the ced backend. Converted from the mispeech/ced- checkpoints (Apache-2.0). CED is a plain AST/DeiT Vision Transformer over a log-mel spectrogram; the port is numerically equal to the PyTorch reference. One self-contained GGUF per size + quant (config, 527 labels, and the mel filterbank/window are all embedded). Pick by your accuracy/size…

Open weights apache-2.0 ced.cpp

Model · Audio classification

lang-id-voxlingua107-ecapa

SpeechBrain

This is a spoken language recognition model trained on the VoxLingua107 dataset using SpeechBrain. The model uses the ECAPA-TDNN architecture that has previously been used for speaker recognition. However, it uses more fully connected hidden layers after the embedding layer, and cross-entropy loss was used for training. We observed that this improved the performance of extracted utterance embeddings for downstream tasks. The system is trained with recordings sampled at 16kHz (single channel). The code will automatically normalize your audio (i.e., resampling + mono channel selection) when calling classifyfile if needed. The model can classify a speech utterance according to the language…

Open weights apache-2.0 speechbrain

Model · Audio classification

accent-id-commonaccent_ecapa

Juan Pablo Zuluaga

Abstract: The recognition of accented speech still remains a dominant problem in Automatic Speech Recognition (ASR) systems. We approach the classification of accented English speech through the Emphasized Channel Attention, Propagation and Aggregation Time Delay Neural Network (ECAPA-TDNN) architecture which has been shown to perform well on a variety of speech tasks. Three models are proposed: one trained from scratch, another two models (one using data augmentation and a baseline model) fine-tuned from the checkpoints of speechbrain/spkrec-ecapa-voxceleb (VoxCeleb). Our results show that the model fine-tuned with data augmentation yield the best results. Most of the misclassifications…

Open weights mit speechbrain

Model · Audio classification

MERT-v1-330M

Multimodal Art Projection

The development log of our Music Audio Pre-training (m-a-p) model family: - 02/06/2023: arxiv pre-print and training codes released. - 17/03/2023: we release two advanced music understanding models, MERT-v1-95M and MERT-v1-330M, trained with new paradigm and dataset. They outperform the previous models and can better generalize to more tasks. - 14/03/2023: we retrained the MERT-v0 model with open-source-only music dataset MERT-v0-public - 29/12/2022: a music understanding model MERT-v0 trained with MLM paradigm, which performs better at downstream tasks. - 29/10/2022: a pre-trained MIR model music2vec trained with BYOL paradigm. Here is a table for quick model pick-up: The m-a-p models…

Open weights cc-by-nc-4.0 transformers