Wav2Vec2-it-emovonalmente-emotion β Model Checkpoints
This repository hosts the checkpoints for the fine-tuned Wav2Vec2 model for Italian speech emotion classification used in the paper "Unsupervised Emotion Pattern Discovery in Long-Form Speech via Acoustic Clustering and Language Model Interpretation".
The checkpoints are not shipped with the GitHub repository due to their size. The paper's code is available in the GitHub repository: github.com/justivanr/unsupervised_emotion_discovery.
Repository layout
wav2vec2-it-emovonalmente-emotion/
βββ .gitattributes
βββ README.md # Model card and usage instructions
βββ config.json # Model architecture and hyperparameters
βββ model.safetensors # Fine-tuned model weights
βββ preprocessor_config.json # Audio feature extractor configuration
βββ special_tokens_map.json # Special token mappings
βββ tokenizer_config.json # Tokenizer configuration
βββ vocab.json # Vocabulary / label mapping
Base Model
We fine-tuned an existing version of Wav2Vec2, namely jonatasgrosman/wav2vec2-large-xlsr-53-italian, which was already fine-tuned on Italian using the train and validation splits of Common Voice 6.1. The model checkpoints can be found in their huggingface repository.
Datasets
We combined the EMOVO (588 audio samples) and Emozionalmente (6,902 audio samples) datasets, applying data augmentation to produce a new combined dataset we refer to as Emovonalmente , consisting of a total of 10,784 audio samples. Both source datasets were split using a traditional 80/20 train-test split, with a further 90/10 split on the training data to create a validation set. Data augmentation was applied only to the final training split.
A script to download both datasets is available in the GitHub repository.
Dataset licensing
- Emozionalmente is released under CC-BY-4.0 .
- EMOVO is distributed for research use only ; see the original EMOVO publication and corpus site for full terms.
Because this model was fine-tuned in part on EMOVO, its distribution here inherits the more restrictive of the two source terms. Accordingly, this model is released under CC-BY-NC-4.0 (non-commercial use, with attribution). If you plan to use this model in a commercial context, please review EMOVO's original terms and contact the corpus authors directly.
Fine-Tuning
Fine-tuning was run using lr=2e-5, weight_decay=0.001, cosine_scheduler, warmup_ratio=0.1, batch_size=8, gradient_accumulation_steps=2, patience=3, and epochs=10, using the Emovonalmente dataset. More details on the fine-tuning experiments are reported in the paper.
Usage
A script to fine-tune the base model is available in the GitHub repository. To run inference, use the following code:
import torch
import librosa
import numpy as np
import soundfile as sf
from transformers import Wav2Vec2ForSequenceClassification, Wav2Vec2Processor
audio_path = "path/to/your/audio.wav"
MODEL_ID = "justivanr/wav2vec2-it-emovonalmente-emotion"
processor = Wav2Vec2Processor.from_pretrained(MODEL_ID)
model = Wav2Vec2ForSequenceClassification.from_pretrained(MODEL_ID, device_map="auto", torch_dtype=torch.float16)
model.eval()
id2label = model.config.id2label
# Resample audio to match needed sampling rate
def resample_audio(audio_path, target_rate=16000):
waveform, sr = librosa.load(audio_path, sr=target_rate, mono=True)
waveform = waveform.astype(np.float32)
return waveform, sr
# Inference can be performed in either classification mode or feature extraction mode
def run_inference(model, processor, audio_path, classify_audio=False):
speech_array, sampling_rate = sf.read(audio_path)
if sampling_rate != 16000:
speech_array, sampling_rate = resample_audio(audio_path, target_rate=16000)
inputs = processor(
speech_array,
sampling_rate=sampling_rate,
return_tensors="pt",
padding=True,
)
inputs = {
k: v.to(device=model.device, dtype=model.dtype) if v.is_floating_point() else v.to(model.device)
for k, v in inputs.items()
}
with torch.no_grad():
if classify_audio:
outputs = model(**inputs)
predicted_id = torch.argmax(outputs.logits, dim=-1).item()
return id2label[predicted_id]
else:
outputs = model.wav2vec2(inputs["input_values"])
hidden_states = outputs.last_hidden_state
pooled = hidden_states.mean(dim=1) # temporal pooling
return pooled.cpu().numpy()
# Inference -- feature extraction mode
embedding = run_inference(model, processor, audio_path, classify_audio=False)
print(f"Extracted embedding with shape {embedding.shape}")
# Example output: Extracted embedding with shape (1, 1024)
# Inference -- classification mode
predicted_emotion = run_inference(model, processor, audio_path, classify_audio=True)
print(f"Audio sample classified as: {predicted_emotion}")
# Example output: Audio sample classified as: disgust
License
CC-BY-NC-4.0 β see the code repository.
Citation
If you use this model, please cite all the listed papers:
@article{manco2026unsupervised,
title={Unsupervised emotion pattern discovery in long-form speech via acoustic clustering and language model interpretation},
author={Manco, Francesco and Rinaldi, Ivan and Anglani, Roberto and Lella, Eufemia and Castellano, Giovanna and Vessio, Gennaro},
journal={Multimedia Tools and Applications},
volume={85},
number={12},
pages={869},
year={2026},
publisher={Springer}
}
@inproceedings{costantini2014emovo,
title={EMOVO corpus: an Italian emotional speech database},
author={Costantini, Giovanni and Iaderola, Iacopo and Paoloni, Andrea and Todisco, Massimiliano and others},
booktitle={Proceedings of the ninth international conference on language resources and evaluation (LREC'14)},
pages={3501--3504},
year={2014},
organization={European Language Resources Association (ELRA)}
}
@article{catania2025emozionalmente,
title={Emozionalmente: A crowdsourced corpus of simulated emotional speech in italian},
author={Catania, Fabio and Wilke, Jordan W and Garzotto, Franca},
journal={IEEE Transactions on Audio, Speech and Language Processing},
volume={33},
pages={1142--1155},
year={2025},
publisher={IEEE}
}
- Downloads last month
- 2