Downloads · 30 days
22
1% of all-time downloads
Beijuka/voice-gender-classifier
voice-gender-classifier is a audio classification model from Beijuka. Use it for the audio classification task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
For those who need pretrained weights, please download it in here
Downloads · 30 days
22
1% of all-time downloads
All-time downloads
2.4K
Public
Parameters
15.5M
61.9 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors61.9 MB · 100%
From the Hugging Face model README
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)
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 (VoxCeleb) may not represent the global human population. Please be careful of unintended biases when using this model.