SpeechEmotionRecognizerOptions

Options & Configuration · AiDotNet.Audio.Emotion

Configuration options for the SpeechEmotionRecognizer.

Inheritance: ModelOptions → NeuralNetworkOptions → ModelHyperparameterOptions → SpeechEmotionRecognizerOptions

For Beginners

This model listens to a short clip of speech and says which emotion it hears. It first turns the audio into a mel spectrogram — a picture of which pitches are loud at each moment — and then runs a small image-style network over that picture. The settings here describe both halves: how the picture is drawn, and how big the network is.

How It Works

Defaults follow Badshah et al., “Speech Emotion Recognition from Spectrograms with Deep Convolutional Neural Network” (IEEE PlatCon 2017), whose network is three convolutional layers deep.

Constructors

Constructor Summary
SpeechEmotionRecognizerOptions() Initializes a new instance carrying the model’s published defaults.
SpeechEmotionRecognizerOptions(SpeechEmotionRecognizerOptions other) Initializes a new instance by copying another instance.

Properties

Property Summary
bool IncludeArousalValence { get; set; } Gets or sets whether the model also reports arousal and valence alongside the emotion label.
double DropoutRate { get; set; } Gets or sets the dropout rate applied in the dense head.
double InputDurationSeconds { get; set; } Gets or sets the clip length, in seconds, the layers are built for.
double LearningRate { get; set; } Gets or sets the learning rate used when the model creates its own optimizer.
int BaseFilters { get; set; } Gets or sets the number of filters in the first convolutional block.
int HiddenDim { get; set; } Gets or sets the width of the dense layer above the convolutional stack.
int HopLength { get; set; } Gets or sets the stride between analysis frames, in samples.
int NFft { get; set; } Gets or sets the FFT window size, in samples.
int NumConvBlocks { get; set; } Gets or sets the number of convolutional blocks.
int NumMels { get; set; } Gets or sets the number of mel frequency bands in the spectrogram.
int SampleRate { get; set; } Gets or sets the sample rate, in hertz, that input audio is expected to have.
string[] EmotionLabels { get; set; } Gets or sets the emotion labels the model predicts over.

Methods

Method Summary
string[] GetEffectiveEmotionLabels() Gets the emotion labels in effect, falling back to DefaultEmotionLabels.
void Validate() Throws if a value this model requires has been left unset or is not positive.

Fields

Field Summary
string[] DefaultEmotionLabels The emotion set the model reports when the caller supplies none.