Views
No views yet
git clone git@github.com:tiantiaf0627/vox-profile-release.gitconda create -n vox_profile python=3.8
cd vox-profile-release
pip install -e .1# Load libraries
2import torch
3import torch.nn.functional as F
4from src.model.emotion.whisper_emotion import WhisperWrapper
5# Find device
6device = torch.device("cuda") if torch.cuda.is_available() else "cpu"
7# Load model from Huggingface
8model = WhisperWrapper.from_pretrained("tiantiaf/whisper-large-v3-msp-podcast-emotion").to(device)
9model.eval()1# Label List
2emotion_label_list = [
3 'Anger',
4 'Contempt',
5 'Disgust',
6 'Fear',
7 'Happiness',
8 'Neutral',
9 'Sadness',
10 'Surprise',
11 'Other'
12]
13
14# Load data, here just zeros as the example
15# Our training data filters output audio shorter than 3 seconds (unreliable predictions) and longer than 15 seconds (computation limitation)
16# So you need to prepare your audio to a maximum of 15 seconds, 16kHz and mono channel
17max_audio_length = 15 * 16000
18data = torch.zeros([1, 16000]).float().to(device)[:, :max_audio_length]
19logits, embedding, _, _, _, _ = model(
20 data, return_feature=True
21)
22
23# Probability and output
24emotion_prob = F.softmax(logits, dim=1)
25print(emotion_label_list[torch.argmax(emotion_prob).detach().cpu().item()])@article{feng2025vox,
title={Vox-Profile: A Speech Foundation Model Benchmark for Characterizing Diverse Speaker and Speech Traits},
author={Feng, Tiantian and Lee, Jihwan and Xu, Anfeng and Lee, Yoonjeong and Lertpetchpun, Thanathai and Shi, Xuan and Wang, Helin and Thebaud, Thomas and Moro-Velazquez, Laureano and Byrd, Dani and others},
journal={arXiv preprint arXiv:2505.14648},
year={2025}
}