Speaker Gender

Website  路  All models  路  Platform  路  Discord

Speaker Gender

Speaker Gender labels the voice in a speech clip female or male, with a probability for each. It was tested on speech in 43 languages, has 316 million parameters, and runs in the standard audio-classification pipeline, with ONNX weights for the browser and the edge.

Highlights

  • 43 languages tested, from English, Spanish and Chinese to Basque, Kinyarwanda and Uyghur.
  • More accurate than the most downloaded open alternatives on every test set below.
  • Standard pipeline: loads in transformers with no custom code; 16 kHz input.
  • Browser and edge: ONNX weights in full precision and int8 for transformers.js and ONNX Runtime.
  • Apache 2.0: free for commercial use.

Results

Measured by EmpirioLabs on 2026-11-20 on speakers the model never heard. Balanced accuracy, the mean of the female and male recall; higher is better. Every model answered the same clips. Bold marks the best score in a row.

Test set Speaker Gender alefiury xlsr-53 gender prithivMLmods Common-Voice gender
Read speech, 40 languages (54,660 clips, 7,724 speakers) 0.973 0.957 0.962
FLEURS test, 12 languages (8,035 clips) 0.971 0.876 0.959
Weakest of the 27 languages with 100+ clips of each label 0.900 0.876 0.895

The comparison models are alefiury/wav2vec2-large-xlsr-53-gender-recognition-librispeech and prithivMLmods/Common-Voice-Gender-Detection. The second learned from crowd-sourced read speech like the first test set, so its score there may include clips it has seen.

Balanced accuracy by language (read speech)
ar ba bn ca ckb cs cy de en eo es et eu fa fr fy gl hu it ja
0.997 1.000 1.000 0.975 0.891 0.997 0.973 0.959 0.971 0.989 0.990 0.993 0.976 0.979 0.954 0.963 0.968 0.975 0.982 0.978
ka kab lg lv mhr nl pl pt ru rw sw ta th tr ug uk ur uz yue zh
0.994 1.000 0.900 0.952 0.995 0.982 0.992 0.954 0.983 0.935 0.969 0.945 0.985 0.981 0.921 0.997 0.986 0.982 0.958 0.950

On FLEURS, the scores by language range from 0.895 (French) to 1.000, except Japanese: all three models label the 79 Japanese clips marked female as male, which this table counts as errors.

The int8 ONNX file scores within 0.001 of full precision.

Quickstart

from transformers import pipeline

classifier = pipeline("audio-classification", model="empiriolabsai/speaker-gender")
classifier("speech.wav")
# [{'label': 'female', 'score': ...}, {'label': 'male', 'score': ...}]

Pass a file path (decoded with ffmpeg) or a 16 kHz mono float array as {"raw": array, "sampling_rate": 16000}. Clips of 2 to 15 seconds of one person speaking work best.

In the browser or Node.js

import { pipeline } from "@huggingface/transformers";

const classifier = await pipeline("audio-classification", "empiriolabsai/speaker-gender", { dtype: "q8" });
const result = await classifier(audioUrl); // a URL, or a Float32Array of 16 kHz samples

dtype: "q8" loads onnx/model_quantized.onnx (356 MB); leave it out for the full-precision file.

Intended use

Aggregate analytics of voice recordings, balancing and filtering speech datasets, and voice applications where the people recorded have agreed to it.

Limitations

  • Two labels only, learned from speakers who described themselves as female or male. The model reports how a voice sounds, not a person's gender identity, and it will be wrong for some voices.
  • One adult speaker per clip. Children, singing, whispering, overlapping speakers and heavy noise are outside what was tested; telephone audio was not tested.
  • Accuracy varies by language, from 0.89 to 1.00 in the table above.
  • Do not use it to make decisions about a person, such as access, eligibility or identity checks.

About EmpirioLabs AI

EmpirioLabs AI builds decision models and offers specialized AI model hosting for open, proprietary, and custom stacks, with GPU Cloud instances and hosted AI agents on the same platform. Website 路 Platform 路 Docs

License

Apache 2.0. The weights and code in this repository may be used commercially. See LICENSE and NOTICE.

Downloads last month
-
Safetensors
Model size
0.3B params
Tensor type
F32
路
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support

Model tree for empiriolabsai/speaker-gender

Finetuned
(927)
this model