Speech & Audio AI Lab

Interactive labs for speech recognition, speech synthesis, and audio in general: in-browser DSP experiments, algorithms, datasets, and a learning path, without storing any recording.

43experiments

Predicting Emotional Indicators

Emotion Indicator Classification

Extract pitch, energy and MFCCs and train a classifier that predicts emotional indicators on licensed acted data. Voice alone does not determine psychological state, and the results are not a diagnosis.

Advanced

Educational content in the form of a scientific draft that needs expert review before being adopted as an academic reference. No experimental result that was not actually run is shown here.

Prerequisites

  • A licensed emotional dataset
  • Python with numpy and librosa
  • Commitment not to use the results in decisions about individuals

Tools

  • pitch-energy
  • mfcc-explorer
  • local-classifier
  • audio-recorder

Implementation Steps

  1. Choose the data and verify the license
  2. Split by speaker between training and testing
  3. Extract F0, energy and MFCCs
  4. Normalize the features per speaker
  5. Train a baseline classifier
  6. Report per-class F1 and the confusion matrix
  7. Discuss the performance limits and acted expression

Code

JavaScript / PythonImplemented and Tested
import numpy as np, librosa
sr = 16000
t = np.arange(sr) / sr
x = 0.3 * np.sin(2 * np.pi * 220 * t)
f0 = librosa.yin(x, fmin=80, fmax=400, sr=sr)
rms = librosa.feature.rms(y=x)[0]
mfcc = librosa.feature.mfcc(y=x, sr=sr, n_mfcc=13)
v = np.r_[f0.mean(), f0.std(), rms.mean(), rms.std(), mfcc.mean(axis=1)]
print('F0 mean', round(f0.mean(), 1), 'vector size', v.shape)

Expected Results

Performance is expected to vary across emotional categories and to drop when tested on unseen speakers.

These are educational expectations and not experimental results actually measured.

Project Tests

  • Compare speaker-independent evaluation with speaker-dependent evaluation
  • Examine the confusion matrix for similar categories
  • Compare with a random baseline

References

  1. Livingstone et al.. The Ryerson Audio-Visual Database of Emotional Speech and Song (RAVDESS): A dynamic, multimodal set of facial and vocal expressions in North American English (2018). DOI
  2. Cao, Cooper, Keutmann, Gur, Nenkova, Verma. CREMA-D: Crowd-Sourced Emotional Multimodal Actors Dataset. IEEE Transactions on Affective Computing (2014). DOI
  3. Davis, Mermelstein. Comparison of parametric representations for monosyllabic word recognition in continuously spoken sentences. IEEE Trans. ASSP 28(4):357-366 (1980). DOI

Audio processing in the experiments takes place inside your browser. Audio, texts, and conversations are not saved on the server. Privacy Policy