1D-CNN Elderly Speech Emotion Recognition πŸŽ™οΈπŸ‘΅πŸ§“

Deep learning 1D Convolutional Neural Network (1D-CNN) for classifying speech emotions specifically in senior citizens / elderly individuals.

Developed as part of the undergraduate thesis at Gunadarma University (Department of Informatics, 2025) by Felix Rafael under the supervision of Dr. Guntur Eka Saputra, S.T., M.M.S.I.


πŸ“Œ Model Overview

Property Details
Architecture Custom 1D Convolutional Neural Network (1D-CNN)
Input Representation 54-dimensional acoustic feature vector (40 MFCC, 12 Chroma, 1 Spectral Flatness, 1 RMS)
Target Population Senior Citizens / Older Adults (Age 60+)
Target Classes 5 Emotions: Angry, Fear, Happy, Neutral, Sad
Evaluation Accuracy 95.00% on held-out test data

Older adults exhibit distinct vocal acoustic traits (reduced fundamental frequency flexibility, vocal jitter, breathiness, and slower speech cadence) compared to younger adults. This model was trained on elderly acoustic features to detect emotional state with high precision.


πŸ“Š Benchmark & Performance Comparison

In empirical benchmarks across audio architectures, the specialized 1D-CNN outperformed deeper residual and dense networks on acoustic feature vectors:

Model Comparison on Elderly Audio Emotion Dataset

Architecture Input Features Test Accuracy Macro F1 Performance Gap vs 1D-CNN
πŸ₯‡ AudioCNN 1D (Ours) 54 Acoustic Features 95.00% 0.95 Baseline
πŸ₯ˆ ResNet1D 54 Acoustic Features 88.00% 0.88 -7.00%
πŸ₯‰ DenseNet1D 54 Acoustic Features 84.00% 0.84 -11.00%

Per-Class Detailed Metrics (AudioCNN 1D)

Emotion Precision Recall F1-Score
Angry 😠 0.96 0.98 0.97
Fear 😨 0.94 0.96 0.95
Happy 😊 0.94 0.97 0.95
Sad 😒 0.93 0.97 0.95
Neutral 😐 0.99 0.89 0.94
Average / Overall 0.95 0.95 0.95

πŸ“‚ Acoustic Feature Extraction & Dataset

Extracted Features (54 Dimensions)

From each audio file (sampled at native rate, normalized to 3 seconds):

  • MFCC (Mel-Frequency Cepstral Coefficients): 40 coefficients capturing spectral envelope and vocal tract resonance.
  • Chroma STFT: 12 coefficients representing pitch class energy distribution.
  • Spectral Flatness: 1 scalar indicating tonality vs noise-like qualities.
  • RMS Energy: 1 scalar measuring speech power and volume intensity.

Training Data

  • Primary Data: 300 recordings of senior citizens speaking everyday conversational phrases across 5 emotional states.
  • Secondary Data: 1,000 samples filtered from the Toronto Emotional Speech Set (TESS) specifically for the Older Adult Female (OAF, age 64) speaker across all 5 emotions.
  • Data Augmentation: Pitch shifting, noise injection, and speed/time-stretching.

πŸ’» How to Use

import torch, joblib, librosa, numpy as np

# 1. Load scaler, label encoder, and PyTorch model
scaler = joblib.load("scaler_audio.pkl")
label_encoder = joblib.load("label_encoder_audio.pkl")

# Define architecture (AudioCNN)
import torch.nn as nn
class AudioCNN(nn.Module):
    def __init__(self, input_len=54, num_classes=5):
        super(AudioCNN, self).__init__()
        self.conv1 = nn.Conv1d(1, 64, kernel_size=3, padding=1)
        self.bn1 = nn.BatchNorm1d(64)
        self.pool1 = nn.MaxPool1d(2)
        self.conv2 = nn.Conv1d(64, 128, kernel_size=3, padding=1)
        self.bn2 = nn.BatchNorm1d(128)
        self.pool2 = nn.MaxPool1d(2)
        self.fc1 = nn.Linear((input_len // 4) * 128, 128)
        self.dropout = nn.Dropout(0.3)
        self.fc2 = nn.Linear(128, num_classes)

    def forward(self, x):
        x = torch.relu(self.bn1(self.conv1(x)))
        x = self.pool1(x)
        x = torch.relu(self.bn2(self.conv2(x)))
        x = self.pool2(x)
        x = x.view(x.size(0), -1)
        x = torch.relu(self.fc1(x))
        x = self.dropout(x)
        return self.fc2(x)

model = AudioCNN(54, 5)
model.load_state_dict(torch.load("model_audio.pt", map_location="cpu"))
model.eval()

# 2. Extract 54 features from audio file
def extract_features(audio_path):
    y, sr = librosa.load(audio_path, duration=3, offset=0.5)
    mfcc = np.mean(librosa.feature.mfcc(y=y, sr=sr, n_mfcc=40).T, axis=0)
    chroma = np.mean(librosa.feature.chroma_stft(y=y, sr=sr).T, axis=0)
    flatness = np.mean(librosa.feature.spectral_flatness(y=y).T, axis=0)
    rms = np.mean(librosa.feature.rms(y=y).T, axis=0)
    return np.hstack([mfcc, chroma, flatness, rms])

feat = extract_features("senior_voice.wav")
scaled = scaler.transform([feat])
tensor = torch.tensor(scaled, dtype=torch.float32).unsqueeze(1)

# 3. Predict
with torch.no_grad():
    probs = torch.softmax(model(tensor), dim=1)[0].numpy()
    pred_idx = np.argmax(probs)
    pred_label = label_encoder.inverse_transform([pred_idx])[0]

print(f"Detected Voice Mood: {pred_label} ({probs[pred_idx]*100:.2f}%)")

πŸ™ Acknowledgments & Credits

Special appreciation and gratitude are extended to:

  1. The Senior Citizen Participants who contributed their voices and everyday conversations to the primary data collection.
  2. Dr. Guntur Eka Saputra, S.T., M.M.S.I., as academic thesis advisor at Gunadarma University, for invaluable technical guidance and direction throughout the development of this project.
  3. Gunadarma University, Faculty of Industrial Technology, Department of Informatics.
  4. Authors of the Toronto Emotional Speech Set (TESS) (Kate Dupuis and M. Kathleen Pichora-Fuller, University of Toronto Psychology Department) for creating high-quality emotion audio recordings across age demographics.

πŸ“– Citation

@misc{rafael2025elderlyemotion,
  author       = {Felix Rafael and Guntur Eka Saputra},
  title        = {Multimodal Elderly Emotion Detection System Using Convolutional Neural Network and Vision Transformer},
  year         = {2025},
  publisher    = {Gunadarma University},
  address      = {Jakarta, Indonesia},
  note         = {Undergraduate Thesis, Department of Informatics, Faculty of Industrial Technology}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Evaluation results