Is it possible to do speech emotion recognition using neural network backpropagation?
Show older comments
Hello everyone, I'm doing emotion speech recognition from human voices. The problem is, there seems some kind of trouble when I try to train them. What I have done so far:
- Importing the sounds used to MATLAB workspace.
- Extracting the MFCCs from those sounds.
- Combining those MFCCs to one matrix and creating trainMatrix.
- Creating targetMatrix.
targetMatrix = [1 1 1 1 1 0 0 0 0 0; 0 0 0 0 0 1 1 1 1 1]; %Say there is two emotion that I want to train with five samples each.
- Importing trainMatrix and targetMatrix to neural network toolbox.
inputs = trainMatrix;
targets = targetMatrix;
hiddenLayerSize = [90];
myNetwork = patternnet(hiddenLayerSize);
myNetwork.inputs{1}.processFcns = {'removeconstantrows','mapminmax'};
myNetwork.outputs{2}.processFcns = {'removeconstantrows','mapminmax'};
myNetwork.divideFcn = 'dividerand';
myNetwork.divideMode = 'sample';
myNetwork.divideParam.trainRatio = 70/100;
myNetwork.divideParam.valRatio = 15/100;
myNetwork.divideParam.testRatio = 15/100;
myNetwork.trainFcn = 'trainlm';
myNetwork.performFcn = 'mse';
myNetwork.plotFcns = {'plotperform','plottrainstate','ploterrhist',...
'plotregression','plotfit'};
[myNetwork,tr] = train(myNetwork,inputs,targets);
outputs = myNetwork(inputs);
errors = gsubtract(targets,outputs);
performance = perform(myNetwork,targets,outputs);
trainTargets = targets .* tr.trainMask{1};
valTargets = targets .* tr.valMask{1};
testTargets = targets .* tr.testMask{1};
trainPerformance = perform(myNetwork,trainTargets,outputs);
valPerformance = perform(myNetwork,valTargets,outputs);
testPerformance = perform(myNetwork,testTargets,outputs);
After doing these steps and trying to run the code, the toolbox keep running till finally my MATLAB goes blank screen. Does my computer are not strong enough to run these? Please kindly answer my question. And maybe you can teach me how to classify them. Currently I'm using class for each result matrix and comparing their value.
Thank you,
Randi
2 Comments
Greg Heath
on 11 Aug 2018
Run your code on a MATLAB sample dataset
help nndatasets
doc nndatasets
so that we can compare our codes on data with which we are familiar.
Greg
Randi Pratama
on 11 Aug 2018
Edited: Randi Pratama
on 11 Aug 2018
Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!