Neuron Network Training - lstm network - record sounds by microphone
Show older comments
Hi I'm new in training neural networks in matlab,
I have recorded recordings on my microphone, and I want to classify them by their features by useing lstm network.
I have 86 words for every word there is a recording i was record, that is 86 recordings i load to my program in matlab.
To check that the network of neurons I created works, I try to put the same word that was
in training for testing- word number one. to classify it after the network is trained,
when I expect to get overfitting because the same word was in the traing and in the test, but every word from the set of words I put I get the classification only to word 64.
and not overfitting as I expected to Get. why is it happening?
the code:
clear all;
currentFolder = pwd;
files_wav=dir([currentFolder '/*.wav']);
num_files=length(files_wav(not([files_wav.isdir])));
for i=1:num_files
[audio(i).audioIn,fs] = audioread(files_wav(i).name);
afe = audioFeatureExtractor("SampleRate",fs, ...
"SpectralDescriptorInput","melSpectrum", ...
"spectralCentroid",true, ...
"spectralSlope",true);
[audio(i).featuresTrain] = extract(afe,(audio(i).audioIn));
audio(i).featuresTrain=audio(i).featuresTrain';
end
featuresTraintoNet = {audio(:).featuresTrain}';
featuresTraintoNet=featuresTraintoNet;
labelsTrain = 1:num_files;
labelsTrain=categorical(labelsTrain');
net=makelayer(featuresTraintoNet,labelsTrain,num_files);
featuretest=audio(1).featuresTrain;
classify(net,featuretest); % why always back 64 label? (the same label for every word in the train that i put in the test)
Accepted Answer
More 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!