SAVRN
Search Contact SAVRN

Open-weight model · Audio classification

wav2vec2-emotion-recognition

by Deepan Gautam Dpngtm/wav2vec2-emotion-recognition

This model is a fine-tuned version of facebook/wav2vec2-base-960h for Speech Emotion Recognition (SER). It has been trained using a Frozen Feature Extractor strategy to preserve the model's acoustic understanding while adapting to emotion detection.

Parameters95M
Context
Weights378.3 MB
Licensemit
AccessOpen weights
Monthly Downloads8.3k

Runs On

What it takes to serve wav2vec2-emotion-recognition (95M 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.2 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.1 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 Deepan Gautam, published under mit, revision 033a5751a5bb.

This model is a fine-tuned version of facebook/wav2vec2-base-960h for Speech Emotion Recognition (SER). It has been trained using a Frozen Feature Extractor strategy to preserve the model's acoustic understanding while adapting to emotion detection. This approach ensures stable performance and prevents "Catastrophic Forgetting," achieving nearly 80% accuracy on the validation set. Update: The "Calm" and "Neutral" classes have been merged to improve classification consistency, resulting in 7 distinct emotion classes. The model was trained on a combined dataset of ~12,000 audio files from: The model classifies audio into one of the following emotions: 1. Angry 2. Disgust 3. Fear 4. Happy 5.…

Read Deepan Gautam's full model card

wav2vec2-emotion-recognition (Robust Fine-Tuning)

This model is a fine-tuned version of facebook/wav2vec2-base-960h for Speech Emotion Recognition (SER).

It has been trained using a Frozen Feature Extractor strategy to preserve the model's acoustic understanding while adapting to emotion detection. This approach ensures stable performance and prevents "Catastrophic Forgetting," achieving nearly 80% accuracy on the validation set.

Update: The "Calm" and "Neutral" classes have been merged to improve classification consistency, resulting in 7 distinct emotion classes.

Model Description

  • Model Architecture: Wav2Vec2 with a frozen CNN feature extractor and a trainable sequence classification head.
  • Language: English
  • Task: Speech Emotion Recognition (SER)
  • Fine-tuned from: facebook/wav2vec2-base-960h
  • Class Merging: The "Calm" emotion has been merged into "Neutral" to reduce label ambiguity.

Datasets

The model was trained on a combined dataset of ~12,000 audio files from: - TESS - CREMA-D - SAVEE - RAVDESS

Performance Metrics

Metric Score
Accuracy 79.94%
F1 Score 79.65%
Validation Loss 0.644

Note: Achieved stable convergence using a Cosine Learning Rate Scheduler and Frozen Feature Extractor.

Supported Emotions (7 Classes)

The model classifies audio into one of the following emotions:

  1. Angry
  2. Disgust
  3. Fear
  4. Happy
  5. Neutral (includes Calm)
  6. Sad
  7. Surprise

Training Configuration

The model was fine-tuned using the following "Robust" configuration to ensure stability on Google Colab T4 GPUs:

  • Feature Extractor: FROZEN (Locked weights to preserve pre-trained acoustic features)
  • Epochs: 10
  • Learning Rate: 3e-5
  • Scheduler: Cosine Decay (Smooth landing)
  • Batch Size: 4 (Physical) / 16 (Effective via Gradient Accumulation)
  • Optimizer: AdamW
  • Precision: fp32 (Standard precision to prevent gradient underflow)

Limitations

Audio Requirements:

  • Sampling Rate: 16kHz (Model will hallucinate if input is not 16kHz. Resampling is required.)
  • Duration: < 10 seconds recommended (Longer files should be chunked).
  • Environment: Best results with clear speech; background noise may reduce confidence.

Demo

Try the model in your browser: Hugging Face Space: Audio Emotion Recognition

FINETUNING NOTEBOOOKS

Notebook

Contact

For issues and questions, feel free to: 1. Open an issue on the Model Repository 2. Comment on the Demo Space

Usage

```python from transformers import AutoModelForAudioClassification, Wav2Vec2Processor import torch import torchaudio import numpy as np

1. Load Model and Processor

model_id = "Dpngtm/wav2vec2-emotion-recognition" model = AutoModelForAudioClassification.from_pretrained(model_id) processor = Wav2Vec2Processor.from_pretrained(model_id)

2. Load Audio

Replace with your file path

audio_path = "path_to_audio.wav" speech_array, sampling_rate = torchaudio.load(audio_path)

3. Resample to 16kHz (CRITICAL STEP)

if sampling_rate != 16000: resampler = torchaudio.transforms.Resample(sampling_rate, 16000) speech_array = resampler(speech_array) sampling_rate = 16000

4. Handle Stereo (Convert to Mono)

if speech_array.shape[0] > 1: speech_array = torch.mean(speech_array, dim=0, keepdim=True)

5. Process & Predict

inputs = processor(speech_array.squeeze(), sampling_rate=16000, return_tensors="pt", padding=True)

with torch.no_grad(): logits = model(**inputs).logits

6. Decode Result

predicted_id = torch.argmax(logits, dim=-1).item() id2label = model.config.id2label predicted_label = id2label[predicted_id]

print(f"Predicted Emotion: {predicted_label}")

Configuration

Architecture
Wav2Vec2ForSequenceClassification
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
32
Model type
wav2vec2

Identity and Version

Repository
Dpngtm/wav2vec2-emotion-recognition
Publisher
Deepan Gautam
Task
Audio classification
Modality
Audio
Library
transformers
Parameters
95M parameters
Languages
en
Revision
033a5751a5bbe5b0b67c2c71e6102c38de35a346
First published
2024-10-29
Last updated
2026-01-20

Files and Weights

10 files, 378.3 MB in total. The weights are 2 files totalling 378.3 MB in bin, safetensors.

Weights2 files · 378.3 MB
Configuration3 files · 2.7 KB
Tokenizer2 files · 1.5 KB
Documentation1 file · 4.9 KB
Other1 file · 13.0 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights378.3 MB 19c9ffbfd4a6
training_args.binWeights5.3 KB 12e850157104
config.jsonConfiguration2.4 KB
preprocessor_config.jsonConfiguration257 B
special_tokens_map.jsonConfiguration96 B
README.mdDocumentation4.9 KB
runs/reconstructed/events.out.tfevents.1768846795.b004a82bd71f.2662.0Other13.0 KB d8ead51360e5
.gitattributesRepository1.5 KB
tokenizer_config.jsonTokenizer1.2 KB
vocab.jsonTokenizer358 B

License and Download

License
mit
Access
Open weights, no gate
Download size
378.3 MB
Download from Deepan Gautam

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

Built From

  • Trained on (disclosed) CREMA-D
  • Trained on (disclosed) RAVDESS
  • Trained on (disclosed) SAVEE
  • Trained on (disclosed) TESS

Memory Requirements

PrecisionWeights in memory
As published378.3 MB
16-bit0.2 GB
8-bit0.1 GB
4-bit0.0 GB

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

Questions About wav2vec2-emotion-recognition

How much GPU memory does wav2vec2-emotion-recognition need?

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

What is the cheapest GPU to run wav2vec2-emotion-recognition 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 wav2vec2-emotion-recognition commercially?

Yes. wav2vec2-emotion-recognition 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

wav2vec2-base-drum-kit

Andrew Keig

Fine-tuned facebook/wav2vec2-base for audio classification of single drum/percussion sounds into 10 classes. - clap, conga, crash, cymbal, hat, kick, ride, rim, snare, tom - Trained on short, single-hit drum sounds. Performance may drop on long mixes, multiple overlapping sounds, or very different recording conditions.

Open weights mit 95M parameters

Model · Audio classification

Common-Voice-Gender-Detection

Prithiv Sakthi

Wav2Vec2: Self-Supervised Learning for Speech Recognition: https://arxiv.org/pdf/2006.11477 male female 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…

Open weights apache-2.0 95M parameters transformers

Model · Audio classification

Deepfake-audio-detection

Mohammed Abdeldayem

This model is a fine-tuned version of mo-thecreator/wav2vec2-base-finetuned on the None dataset. It achieves the following results on the evaluation set: The following hyperparameters were used during training: - learningrate: 3e-05 - trainbatchsize: 8 - evalbatchsize: 8 - gradientaccumulationsteps: 4 - totaltrainbatchsize: 32 - lrschedulertype: linear - lrschedulerwarmupratio: 0.1 - numepochs: 5 - Transformers 4.39.3 - Pytorch 2.1.2 - Datasets 2.18.0 - Tokenizers 0.15.2 - mo-thecreator

Open weights apache-2.0 95M parameters transformers

Model · Audio classification

Deepfake-audio-detection-V2

Melody Machine

This model is a fine-tuned version of motheecreator/Deepfake-audio-detection on the audiofolder dataset. It achieves the following results on the evaluation set: The following hyperparameters were used during training: - learningrate: 3e-05 - trainbatchsize: 32 - evalbatchsize: 32 - gradientaccumulationsteps: 4 - totaltrainbatchsize: 128 - lrschedulertype: cosine - lrschedulerwarmupratio: 0.1 - numepochs: 5 - Transformers 4.41.2 - Pytorch 2.1.2 - Datasets 2.19.2 - Tokenizers 0.19.1

Open weights apache-2.0 95M parameters transformers

The model expects a raw audio signal as input and outputs predictions for age in a range of approximately 0...1 (0...100 years) and gender expressing the probababilty for being child, female, or male. In addition, it also provides the pooled states of the last transformer layer. The model was created by fine-tuning Wav2Vec2-Large-Robust Timit and For this version of the model we only trained the first six transformer layers. An ONNX export of the model is available from Further details are given in the associated paper and tutorial.

Open weights cc-by-nc-sa-4.0 91M parameters transformers

Audio Spectrogram Transformer (AST) model fine-tuned on AudioSet. It was introduced in the paper AST: Audio Spectrogram Transformer by Gong et al. and first released in this repository. Disclaimer: The team releasing Audio Spectrogram Transformer did not write a model card for this model so this model card has been written by the Hugging Face team. The Audio Spectrogram Transformer is equivalent to ViT, but applied on audio. Audio is first turned into an image (as a spectrogram), after which a Vision Transformer is applied. The model gets state-of-the-art results on several audio classification benchmarks. You can use the raw model for classifying audio into one of the AudioSet classes. See…

Open weights bsd-3-clause 87M parameters transformers