🚀 語音情感識別模型
本模型是為2024年奧德賽情感識別競賽基線而設計,在 MSP-Podcast 數據集上進行訓練。該模型基於分類方式,能夠預測以下情感類別:“憤怒”、“悲傷”、“快樂”、“驚訝”、“恐懼”、“厭惡”、“輕蔑”和“中立”。
✨ 主要特性
- 基於 MSP-Podcast 數據集訓練,用於2024年奧德賽情感識別競賽基線。
- 採用分類方式,可預測多種情感類別。
📚 詳細文檔
基準測試
基於奧德賽競賽的Test3和開發集的F1分數:
以下是具體的F1分數表格:
|
Test 3 |
|
|
|
Development |
|
|
|
|
F1-Mic. |
F1-Ma. |
Prec. |
Rec. |
F1-Mic. |
F1-Ma. |
Prec. |
Rec. |
|
0.327 |
0.311 |
0.332 |
0.325 |
0.409 |
0.307 |
0.316 |
0.345 |
更多詳細信息可參考:演示、論文 和 GitHub。
引用信息
@InProceedings{Goncalves_2024,
author={L. Goncalves and A. N. Salman and A. {Reddy Naini} and L. Moro-Velazquez and T. Thebaud and L. {Paola Garcia} and N. Dehak and B. Sisman and C. Busso},
title={Odyssey2024 - Speech Emotion Recognition Challenge: Dataset, Baseline Framework, and Results},
booktitle={Odyssey 2024: The Speaker and Language Recognition Workshop)},
volume={To appear},
year={2024},
month={June},
address = {Quebec, Canada},
}
💻 使用示例
基礎用法
from transformers import AutoModelForAudioClassification
import librosa, torch
model = AutoModelForAudioClassification.from_pretrained("3loi/SER-Odyssey-Baseline-WavLM-Categorical-Attributes", trust_remote_code=True)
mean = model.config.mean
std = model.config.std
audio_path = "/path/to/audio.wav"
raw_wav, _ = librosa.load(audio_path, sr=model.config.sampling_rate)
norm_wav = (raw_wav - mean) / (std+0.000001)
mask = torch.ones(1, len(norm_wav))
wavs = torch.tensor(norm_wav).unsqueeze(0)
with torch.no_grad():
pred = model(wavs, mask)
print(model.config.id2label)
print(pred)
probabilities = torch.nn.functional.softmax(pred, dim=1)
print(probabilities)
📄 許可證
本模型採用MIT許可證。