prithivMLmods / Common-Voice-Gender-Detection

huggingface.co
Total runs: 184.7K
24-hour runs: 0
7-day runs: 1.3K
30-day runs: 1.3K
Model's Last Updated: November 12 2025
audio-classification

Introduction of Common-Voice-Gender-Detection

Model Details of Common-Voice-Gender-Detection

1.png

Common-Voice-Gender-Detection

Common-Voice-Gender-Detection is a fine-tuned version of facebook/wav2vec2-base-960h for binary audio classification , specifically trained to detect speaker gender as female or male . This model leverages the Wav2Vec2ForSequenceClassification architecture for efficient and accurate voice-based gender classification.

Wav2Vec2: Self-Supervised Learning for Speech Recognition : https://arxiv.org/pdf/2006.11477

Classification Report:

              precision    recall  f1-score   support

      female     0.9705    0.9916    0.9809      2622
        male     0.9943    0.9799    0.9870      3923

    accuracy                         0.9846      6545
   macro avg     0.9824    0.9857    0.9840      6545
weighted avg     0.9848    0.9846    0.9846      6545

download.png

download (1).png


Label Space: 2 Classes
Class 0: female  
Class 1: male

Install Dependencies
pip install gradio transformers torch librosa hf_xet

Inference Code
import gradio as gr
from transformers import Wav2Vec2ForSequenceClassification, Wav2Vec2FeatureExtractor
import torch
import librosa

# Load model and processor
model_name = "prithivMLmods/Common-Voice-Geneder-Detection"
model = Wav2Vec2ForSequenceClassification.from_pretrained(model_name)
processor = Wav2Vec2FeatureExtractor.from_pretrained(model_name)

# Label mapping
id2label = {
    "0": "female",
    "1": "male"
}

def classify_audio(audio_path):
    # Load and resample audio to 16kHz
    speech, sample_rate = librosa.load(audio_path, sr=16000)

    # Process audio
    inputs = processor(
        speech,
        sampling_rate=sample_rate,
        return_tensors="pt",
        padding=True
    )

    with torch.no_grad():
        outputs = model(**inputs)
        logits = outputs.logits
        probs = torch.nn.functional.softmax(logits, dim=1).squeeze().tolist()

    prediction = {
        id2label[str(i)]: round(probs[i], 3) for i in range(len(probs))
    }

    return prediction

# Gradio Interface
iface = gr.Interface(
    fn=classify_audio,
    inputs=gr.Audio(type="filepath", label="Upload Audio (WAV, MP3, etc.)"),
    outputs=gr.Label(num_top_classes=2, label="Gender Classification"),
    title="Common Voice Gender Detection",
    description="Upload an audio clip to classify the speaker's gender as female or male."
)

if __name__ == "__main__":
    iface.launch()

Demo Inference

male

Screenshot 2025-05-31 at 20-19-39 Common Voice Gender Detection.png

female

Screenshot 2025-05-31 at 20-21-57 Common Voice Gender Detection.png


Intended Use

Common-Voice-Gender-Detection is designed for:

  • Speech Analytics – Assist in analyzing speaker demographics in call centers or customer service recordings.
  • Conversational AI Personalization – Adjust tone or dialogue based on gender detection for more personalized voice assistants.
  • Voice Dataset Curation – Automatically tag or filter voice datasets by speaker gender for better dataset management.
  • Research Applications – Enable linguistic and acoustic research involving gender-specific speech patterns.
  • Multimedia Content Tagging – Automate metadata generation for gender identification in podcasts, interviews, or video content.

Runs of prithivMLmods Common-Voice-Gender-Detection on huggingface.co

184.7K
Total runs
0
24-hour runs
1.3K
3-day runs
1.3K
7-day runs
1.3K
30-day runs

More Information About Common-Voice-Gender-Detection huggingface.co Model

More Common-Voice-Gender-Detection license Visit here:

https://choosealicense.com/licenses/apache-2.0

Common-Voice-Gender-Detection huggingface.co

Common-Voice-Gender-Detection huggingface.co is an AI model on huggingface.co that provides Common-Voice-Gender-Detection's model effect (), which can be used instantly with this prithivMLmods Common-Voice-Gender-Detection model. huggingface.co supports a free trial of the Common-Voice-Gender-Detection model, and also provides paid use of the Common-Voice-Gender-Detection. Support call Common-Voice-Gender-Detection model through api, including Node.js, Python, http.

Common-Voice-Gender-Detection huggingface.co Url

https://huggingface.co/prithivMLmods/Common-Voice-Gender-Detection

prithivMLmods Common-Voice-Gender-Detection online free

Common-Voice-Gender-Detection huggingface.co is an online trial and call api platform, which integrates Common-Voice-Gender-Detection's modeling effects, including api services, and provides a free online trial of Common-Voice-Gender-Detection, you can try Common-Voice-Gender-Detection online for free by clicking the link below.

prithivMLmods Common-Voice-Gender-Detection online free url in huggingface.co:

https://huggingface.co/prithivMLmods/Common-Voice-Gender-Detection

Common-Voice-Gender-Detection install

Common-Voice-Gender-Detection is an open source model from GitHub that offers a free installation service, and any user can find Common-Voice-Gender-Detection on GitHub to install. At the same time, huggingface.co provides the effect of Common-Voice-Gender-Detection install, users can directly use Common-Voice-Gender-Detection installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Common-Voice-Gender-Detection install url in huggingface.co:

https://huggingface.co/prithivMLmods/Common-Voice-Gender-Detection

Url of Common-Voice-Gender-Detection

Common-Voice-Gender-Detection huggingface.co Url

Provider of Common-Voice-Gender-Detection huggingface.co

prithivMLmods
ORGANIZATIONS

Other API from prithivMLmods