SAVRN
Search Contact SAVRN

Open-weight model · Audio classification

voice-gender-classifier

by Huh JaesungHuh/voice-gender-classifier

This repo contains the inference code to use pretrained human voice gender classifier. - You could also try Huggingface online demo. First, clone the original github repository and install the packages via pip.

Parameters15M
Context
Weights61.9 MB
Licensemit
AccessOpen weights
Monthly Downloads75k

Runs On

What it takes to serve voice-gender-classifier (15M 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 Huh, published under mit, revision db1222153bd6.

This repo contains the inference code to use pretrained human voice gender classifier. - You could also try Huggingface online demo. First, clone the original github repository and install the packages via pip. For those who need pretrained weights, please download it in here State-of-the-art speaker verification model already produces good representation of the speaker's gender. I used the pretrained ECAPA-TDNN from TaoRuijie's repository, added one linear layer to make two-class classifier, and finetuned the model with the VoxCeleb2 dev set. The model achieved 98.7% accuracy on the VoxCeleb1 identification test split. I would like to note the training dataset I've used for this model…

Read Huh's full model card
  • This repo contains the inference code to use pretrained human voice gender classifier.
  • You could also tryHuggingface online demo.

Installation

First, clone the original github repository

git clone https://github.com/JaesungHuh/voice-gender-classifier.git

and install the packages via pip.

cd voice-gender-classifier
pip install -r requirements.txt

Usage

import torch

from model import ECAPA_gender

# You could directly download the model from the huggingface model hub
model = ECAPA_gender.from_pretrained("JaesungHuh/voice-gender-classifier")
model.eval()

# If you are using gpu .... 
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)

# Load the audio file and use predict function to directly get the output
example_file = "data/00001.wav"
with torch.no_grad():
    output = model.predict(example_file, device=device)
    print("Gender : ", output)

Pretrained weights

For those who need pretrained weights, please download it in here

Training details

State-of-the-art speaker verification model already produces good representation of the speaker's gender.

I used the pretrained ECAPA-TDNN from TaoRuijie's repository, added one linear layer to make two-class classifier, and finetuned the model with the VoxCeleb2 dev set.

The model achieved 98.7% accuracy on the VoxCeleb1 identification test split.

Caveat

I would like to note the training dataset I've used for this model (VoxCeleb) may not represent the global human population. Please be careful of unintended biases when using this model.

Reference

Identity and Version

Repository
JaesungHuh/voice-gender-classifier
Publisher
Huh
Task
Audio classification
Modality
Audio
Library
transformers
Parameters
15M parameters
Languages
Not stated by the source
Revision
db1222153bd60337e900be22add7af180452adc0
First published
2024-05-13
Last updated
2025-05-04

Files and Weights

7 files, 62.4 MB in total. The weights are 1 file totalling 61.9 MB in safetensors.

Weights1 file · 61.9 MB
Configuration1 file · 15 B
Documentation1 file · 2.4 KB
Other2 files · 505.7 KB
Repository2 files · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights61.9 MB 2d8e0be1fdf1
config.jsonConfiguration15 B
README.mdDocumentation2.4 KB
example1.wavOther267.6 KB
example2.wavOther238.1 KB
.gitattributesRepository1.5 KB
.gitignoreRepository9 B

License and Download

License
mit
Access
Open weights, no gate
Download size
61.9 MB
Download from Huh

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

Built From

Memory Requirements

PrecisionWeights in memory
As published61.9 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 voice-gender-classifier

How much GPU memory does voice-gender-classifier need?

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

What is the cheapest GPU to run voice-gender-classifier 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 voice-gender-classifier commercially?

Yes. voice-gender-classifier 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

distilhubert-finetuned-gtzan

Rajesh Kumar

This model is a fine-tuned version of ntu-spml/distilhubert on the GTZAN dataset. It achieves the following results on the evaluation set: - evalloss: 0.8970 - evalmodelpreparationtime: 0.0018 - evalaccuracy: 0.87 - evalruntime: 443.4759 - evalsamplespersecond: 0.225 - evalstepspersecond: 0.029 The following hyperparameters were used during training: - learningrate: 5e-05 - trainbatchsize: 8 - evalbatchsize: 8 - lrschedulertype: linear - lrschedulerwarmupsteps: 100 - numepochs: 10 - mixedprecisiontraining: Native AMP - labelsmoothingfactor: 0.1 - Transformers 5.16.1 - Pytorch 2.11.0+cpu - Datasets 2.19.0 - Tokenizers 0.23.1

Open weights apache-2.0 24M parameters transformers

Model · Audio classification

WeSpeaker-ResNet34-LM-MLX

Ivan

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…

Open weights mit 7M parameters mlx

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