Emotion2VecOptions

Options & Configuration · AiDotNet.Audio.Emotion

Configuration options for the emotion2vec speech emotion recognition model.

Inheritance: ModelOptions → Emotion2VecOptions

For Beginners

emotion2vec is a model that “reads” emotions from speech. It was trained on millions of speech samples to understand emotional patterns, then fine-tuned to classify specific emotions like happy, sad, angry, etc.

How It Works

emotion2vec (Ma et al., 2023) is a universal speech emotion representation model that uses self-supervised pre-training on unlabeled speech data followed by fine-tuning. It achieves state-of-the-art results across multiple SER benchmarks with a single model, outperforming task-specific models.

Constructors

Constructor Summary
Emotion2VecOptions()

Properties

Property Summary
OnnxModelOptions OnnxOptions { get; set; } Gets or sets the ONNX runtime options.
bool IncludeArousalValence { get; set; } Gets or sets whether to include arousal/valence regression heads.
double DropoutRate { get; set; } Gets or sets the dropout rate.
double LearningRate { get; set; } Gets or sets the learning rate for training.
double WeightDecay { get; set; } Gets or sets the weight decay for regularization.
int FeedForwardDim { get; set; } Gets or sets the feed-forward dimension.
int FftSize { get; set; } Gets or sets the FFT window size in samples.
int HopLength { get; set; } Gets or sets the hop length between frames in samples.
int NumAttentionHeads { get; set; } Gets or sets the number of attention heads.
int NumClasses { get; set; } Gets or sets the number of emotion classes.
int NumMels { get; set; } Gets or sets the number of mel filterbank channels.
int NumTransformerLayers { get; set; } Gets or sets the number of Transformer layers.
int SampleRate { get; set; } Gets or sets the expected audio sample rate in Hz.
int TransformerDim { get; set; } Gets or sets the Transformer encoder dimension.
string ModelPath { get; set; } Gets or sets the path to the ONNX model file.
string[] EmotionLabels { get; set; } Gets or sets the emotion labels.