## 3 Proposed Approach
### Sentiment Analysis Feature Extraction  
In the domain of sentiment analysis, the process of feature extraction plays a pivotal role in deriving meaningful representations from text inputs, subsequently utilized for sentiment classification tasks. This subsection presents our chosen feature engineering, drawing from established techniques in the literature. The preprocessing pipeline begins with the conversion of audio inputs to text using speech-to-text techniques (e.g., API such as Google Cloud Speech-to-Text since it covers a range of languages). Once the audio is transcribed into textual form, further preprocessing steps are employed to prepare the text data for feature extraction. Tokenization is applied to segment the text into individual tokens, typically words or subword units. The process of tokenization facilitates the creation of a bag-of-words (BoW) representation, where the frequency of occurrence of each token in the text corpus is recorded. BoW encoding captures the presence or absence of words in the text, disregarding their order, and serves as the basis for subsequent feature extraction. Feature extraction techniques based on scores are then utilized to derive sentiment-specific features from the BoW representation. These features include sentiment lexicons, word embeddings, and statistical measures computed from the BoW vectors. In this study we focus on the frequency-inverse document frequency (TF-IDF) weighting scheme, which is used to quantify the importance of terms in a document relative to a corpus. ```
Input: audio signal Result: Features vector \(\text{F}_{\text{w}_{t}}\) extracted from the raw data for each slide window \(w_{t}\) \(init=1,\text{ }w_{t}=1\text{ }s\); while getting a sequence of audio data (\(>1\text{ }s\)): ifinitthen \(prev\_lag=0\); \(post\_lag=1\);  end if \(init=0\); for each slide window \((w_{t}-prev\_lag)\) to \((w_{t}+post\_lag)\): Compute MFCCs (Mel-Frequency Cepstral Coefficients): 1. Compute the Short-Time Fourier Transform (STFT) of the audio signal \(x(n)\) to each frame \(n\) at window \(w(k)\in N\): \(X(n,m)=\sum_{k=0}^{N-1}x(n+k)\cdot w(k)\cdot e^{-j/2\text{sgn}m/N}\) 2. Map the power spectrum \(|X(n,m)|^{2}\) onto the Mel-frequency scale using a filter bank \(H_{m}(n)\) to get the magnitude \(H_{m}(k)\) at bin \(m\): \[H_{m}(k)=\sum_{n=0}^{\frac{N}{2}}|X(n,m)|^{2}\cdot H_{m}(n).\] 3. Take the logarithm of the Mel power spectrum \(M_{m}(k)=\log(H_{m}(k))\), 4. Compute the Discrete Cosine Transform (DCT) of the log Mel power spectrum: \[C_{n}=\sum_{n=0}^{N-1}M_{m}(k)\cdot\cos\Big{[}\frac{\pi}{M}(m+\frac{1}{2}n) \Big{]}.\] 5. Keep the lower-dimensional DCT coefficients as MFCCs. Compute and keep the Mel-spectrogram (\(S\!f\), \(f\)) from the power spectrum \(P(f\), \(f)=|X(n,m)|^{2}\) obtained from STFT using filter bank (MFCCs step b). Compute Chroma Features by summing the power spectrum \(P\) at bin \(k\) over each pitch class \(C_{t}(t)\)at time frame t, where \(\delta(f_{k}-f_{t})\) is the Kronecker delta function which equals \(1\), if \(f_{k}\) is the frequency corresponding to class \(i\), \(0\) otherwise: \[C_{i}(t)=\sum_{k=0}^{N}P(k,t)\cdot\delta(f_{k}-f_{t}).\] Compute Statistical Features from MFCCs, Mel-spectrogram and Chroma results, such as mean \(\mu=\frac{1}{N}\sum_{i=1}^{N}x(i)\), standard deviation \(\sigma=\sqrt{\frac{1}{N}\sum_{i=1}^{N}(x(i)-\mu)^{2}}\), skewness \(=\frac{\sum_{i=1}^{N}(x_{i}-\mu)^{2}/N}{\sigma^{2}}\) and kurtosis \(=\frac{\sum_{i=1}^{N}(x_{i}-\mu)^{4}/N}{\sigma^{4}}-3\), and the minimum, maximum and median values. Compute the Energy of the audio signal \(x(n)\) as the sum of the squared amplitude values over a given window of time \(E=\sum_{i=1}^{N}|x(i)\square|^{2}\) Compute the Zero Crossing Rate to measure the rate at which the audio signal changes its sign within the window with N samples, \(Z=\frac{1}{N-1}|\text{sign}(x(n))-\text{sign}(x(n-1))|^{\square}\).