We classify seven emotions (anger, boredom, disgust, fear, happiness, sadness and neutral) from short utterances, using log-mel spectrograms as images. We compare two convolutional networks. The first is a small CNN trained from scratch (99 k parameters). The second is a ResNet-18 pretrained on ImageNet, kept frozen, with a new linear head. Both are evaluated on the Berlin Emotional Speech Database (EmoDB) with leave-two-speakers-out cross-validation, so every score is measured on voices the model never heard.
The CNN trained from scratch reaches 75.4 % unweighted average recall, against 61.6 % for the transfer model (chance level: 14.3 %). Most errors happen between emotions with similar arousal, for example happiness and anger. The full pipeline, from waveform to spectrogram to both networks, is exported to ONNX and runs entirely in the browser below.

