# Emotion Recognition from Speech in a Subject-Independent Approach
## 5 Methods
### Feature Extraction  
There are many feature extraction methods that can be used to analyze emotions in speech. The choice of appropriate methods depends on the specifics of the task and the characteristics of the data. Speech signal energy is measured as the sum of the squared amplitude values of samples within a frame [54]. In practice, the logarithm of energy is often used to better reflect human perception of loudness. High signal energy may indicate stronger emotions, such as anger or excitement, while lower energy may be characteristic of calm or sad states. Mel-frequency cepstral coefficients (MFCCs) are calculated by transforming the power spectrum of the speech signal onto the mel scale, which better mirrors the human ear's perception of sound [55; 56; 57; 58]. This process begins by dividing the speech signal into short frames. For each frame, a Fourier transform is calculated to obtain the power spectrum. Then, this spectrum is filtered using a set of triangular filters evenly spaced on the mel scale. The energy from each filter is logarithmized, and a discrete cosine transform (DCT) is applied to obtain cepstral coefficients. In our research we used the first twelve MFCCs, which are commonly employed to characterize the speech signal. The delta MFCC, the first-order derivative of MFCCs over time, represents the rate of change in spectral features. Delta-delta MFCCs, also known as the \"acceleration\" of MFCCs, are the second-order derivatives of MFCCs over time. They represent the rate of change in the delta parameters. The zero-crossing rate (ZCR) measures how many times the signal waveform crosses zero within a fixed time window and correlates with the relative energy in higher versus lower frequencies [29; 59]. The speech signal spectrum is characterized by certain local maxima and minima. The local maxima are called formants and are denoted by the letter F followed by a number indicating the formant number. The laryngeal tone--also called the fundamental frequency (F0)--is the rate at which the vocal folds vibrate during voiced speech. It corresponds to the lowest-frequency component (the first harmonic) of the glottal excitation signal and is perceived by listeners as the speaker's pitch [31]. The speaker's emotional state also affects this parameter. The spectrum's center of gravity, also known as the weighted mean frequency, is a measure that determines the average frequency of the sound spectrum, weighted by amplitude [60]. Spectral flux measures the degree of change in the power spectrum of the speech signal between consecutive frames [61; 62]. Spectral roll-off is the frequency point below which the accumulated spectrum energy reaches a specified percentage (e.g., 80%, 50%, 30%) of the total energy [63; 64]. This allows for the identification of dominant frequency bands in the speech signal.  
Table 2 presents a description of the calculated features (where \(i\) represents the \(i\)-th mel-cepstral coefficient \(i=1\) to 12, and p for spectral roll-off specifies how much of the frequencies are concentrated below a given energy threshold \(p=80\%\), 50%, or 30%). In total, 96 features were calculated. Each of these features provides information about the speech signal that can be utilized for emotional analysis. By combining a variety of feature extraction methods, speech emotion recognition systems can achieve high accuracy in identifying emotional states. All extracted features for the RAVDESS and EMO-BAJKA dataset, including the training, validation, and test splits, have been made available on the website: [[https://github.com/kolodzima/EmotionRecognitionSpeech](https://github.com/kolodzima/EmotionRecognitionSpeech)]([https://github.com/kolodzima/EmotionRecognitionSpeech](https://github.com/kolodzima/EmotionRecognitionSpeech)) (accessed on 11 June 2025).