{
  "id": 16939487,
  "title": "Speech Emotion Recognition",
  "url": "https://urgent.news/2026/10/28/speech-emotion-recognition",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-28T18:47:27.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/kenyansa/speech-emotion-recognition-1kk4"
  },
  "original_language": "en",
  "account": "Speech carries more than just words. The way it sounds, with changes in pitch, energy, rhythm, and tone, can give listeners hints about how an utterance feels emotionally. This is the focus of the Speech Emotion Recognition project, which uses machine learning to spot these patterns in audio and give it a label describing the emotion.\n\nThe project relies on a dataset called RAVDESS, which contains acted speech recordings expressing different emotions. There are six possible labels: neutral, happy, sad, angry, fearful, and disgust. Since the speakers are acting, the system's output should be seen as a prediction based on the patterns in this dataset, rather than a reliable reading of a person's true emotional state.\n\nBefore a model can classify an audio clip, it needs to be prepared. The audio is converted into a consistent form, with mono, resampling to 22,050 Hz, trimming of silence, and adjustment to three seconds. Normalization of the waveform is also done. Two types of audio features are prepared: Mel-frequency cepstral coefficients (MFCCs) and a log-mel spectrogram. MFCCs use 40 coefficients, each with a time-based mean and standard deviation, creating an 80-value feature vector. The spectrogram shows how sound energy changes over time across frequency bands, and is turned into a 128-by-128 image for a convolutional neural network.\n\nSeveral modeling approaches are compared. For the MFCC training, a support vector machine, a random forest, and an XGBoost classifier are evaluated on validation and test data. The best model is chosen using validation macro-F1, which measures performance across all classes. A separate workflow trains a convolutional neural network on the log-mel spectrograms, using validation accuracy to guide learning-rate adjustments and early stopping. The CNN is saved as its own model. The API currently uses the MFCC pipeline, while the CNN training workflow is available in the repository but not loaded or served by the API.\n\nTo ensure the evaluation is speaker-independent, the data loader assigns each actor's recordings to one of three splits: training, validation, or test. Each of these splits is 15% of the data. This helps reduce the chance that the same person's voice appears in both training and evaluation data, making the evaluation more meaningful. The API provides an HTTP endpoint for audio classification, accepting WAV, MP3, FLAC, OGG, and M4A files up to 20 MB. It gives the predicted label, top three class probabilities, clip duration, and a disclaimer. The endpoint also has health and interactive API documentation.",
  "summary": "From Speech to Emotion Labels: Inside a Speech Recognition Speech carries more than words. Changes in pitch, energy, rhythm, and tone can give listeners clues about how an utterance sounds emotionally. The Speech Emotion Recognition project explores how machine learning can identify those patterns in audio and assign an emotion label. Try the product: tonelabb.vercel.app The project is built…",
  "key_points": [
    "Speech carries emotional cues through pitch, energy, rhythm, and tone",
    "RAVDESS dataset contains acted speech recordings with six emotion labels",
    "API classifies audio files up to 20 MB via WAV, MP3, FLAC, OGG, M4A"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}