Downloads · 30 days
2
29% of all-time downloads
ahamino/wav2vec2-msp-dim-emotion-coreml
wav2vec2-msp-dim-emotion-coreml is a audio classification model from ahamino. Use it for the audio classification task on the model card, and read the license before you ship it in a product. It is set up for coreml. The card lists the license as cc-by-nc-sa-4.0.
A Core ML (.mlpackage) conversion of audeering/wav2vec2-large-robust-12-ft-emotion-msp-dim for on-device dimensional speech emotion recognition (arousal / dominance / valence) on Apple Silicon (Neural Engine / GPU / C…
Downloads · 30 days
2
29% of all-time downloads
All-time downloads
7
Public
Repo size
662 MB
Likes
0
Public
Click a slice to open those files.
.bin661 MB · 100%
From the Hugging Face model README
A Core ML (.mlpackage) conversion of
audeering/wav2vec2-large-robust-12-ft-emotion-msp-dim
for on-device dimensional speech emotion recognition (arousal / dominance / valence)
on Apple Silicon (Neural Engine / GPU / CPU via MLComputeUnits.all).
⚠️ Research / non-commercial use only. This is a derivative work and inherits the original model's CC BY-NC-SA 4.0 license. See License & attribution below.
This model is a derivative work of audEERING's model and is released under the same license: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 (CC BY-NC-SA 4.0).
audeering/wav2vec2-large-robust-12-ft-emotion-msp-dim
("for research purpose only"). A commercial license for the original can be obtained from audEERING.coremltools; the Wav2Vec2 feature normalization (zero-mean/unit-variance) is baked into the graph,
so the model consumes a raw waveform directly. No weights were retrained or altered.@article{wagner2023dawn,
title = {Dawn of the Transformer Era in Speech Emotion Recognition:
Closing the Valence Gap},
author = {Wagner, Johannes and Triantafyllopoulos, Andreas and Wierstorf, Hagen and
Schmitt, Maximilian and Burkhardt, Felix and Eyben, Florian and Schuller, Bj{\"o}rn W.},
journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
year = {2023},
note = {arXiv:2203.07378}
}
A single tensor of 3 values in the order [arousal, dominance, valence], each ≈ [0, 1].
Valence is index 2. To map valence to a bipolar [-1, 1] scale: clamp(2·v − 1, −1, 1).
[1, T].4800 – 480000 samples).Validated numerically identical to the PyTorch reference (FLOAT32):
Pearson r = 1.000000, mean/max abs error ≈ 0 on valence, arousal, and dominance across the validation set.
import CoreML
let cfg = MLModelConfiguration()
cfg.computeUnits = .all
let compiled = try await MLModel.compileModel(at: mlpackageURL)
let model = try MLModel(contentsOf: compiled, configuration: cfg)
// samples: [Float] raw mono 16 kHz, 0.3–30 s
let x = try MLMultiArray(shape: [1, NSNumber(value: samples.count)], dataType: .float32)
for (i, s) in samples.enumerated() { x[i] = NSNumber(value: s) }
let out = try model.prediction(from: try MLDictionaryFeatureProvider(dictionary: ["input_waveform": x]))
// read the 3-vector output; valence = index 2; bipolar = clamp(2v-1, -1, 1)
On-device, privacy-preserving prosody/affect analysis of meeting audio (research use), e.g. deriving a per-speaker acoustic valence to compare against text sentiment ("tone vs. words"). Dimensional SER models carry speaker/timbre and dataset biases — prefer within-speaker trends over cross-speaker absolute comparisons, and never treat a single score as ground truth about a person's emotional state.