matlab 深度学习做声音分类
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了matlab 深度学习做声音分类相关的知识,希望对你有一定的参考价值。
1、内容简介
略
595-可以交流、咨询、答疑
深度学习做声音分类
2、内容说明
提取声音特征,然后通过CNN进行分类
3、仿真分析
[normal_01_L,~] = audioread(正常样本2s_01_L.wav);
[normal_02_L,~] = audioread(正常样本2s_02_L.wav);
[qikong_01_L,fs] = audioread(气孔样本2s_01_L.wav);len = 8e4;
numTrain = 800;
audioTrain = [data_1(:,1:numTrain),data_2(:,1:numTrain),data_3(:,1:numTrain)];
labelsTrain = [data_1_Label(1:numTrain);data_2_Label(1:numTrain);data_3_Label(1:numTrain)];audioValidation = [data_1(:,numTrain+1:end),data_2(:,numTrain+1:end),data_3(:,numTrain+1:end)];
labelsValidation = [data_1_Label(numTrain+1:end);data_2_Label(numTrain+1:end);data_3_Label(numTrain+1:end)]; aFE = audioFeatureExtractor("SampleRate",fs, ...
"SpectralDescriptorInput","melSpectrum", ...
"spectralCentroid",true, ...
"spectralSlope",true); featuresTrain = extract(aFE,audioTrain);
[numHopsPerSequence,numFeatures,numSignals] = size(featuresTrain)featuresTrain = permute(featuresTrain,[2,1,3]);
featuresTrain = squeeze(num2cell(featuresTrain,[1,2]));numSignals = numel(featuresTrain)
[numFeatures,numHopsPerSequence] = size(featuresTrain1)
featuresValidation = extract(aFE,audioValidation);
featuresValidation = permute(featuresValidation,[2,1,3]);
featuresValidation = squeeze(num2cell(featuresValidation,[1,2]));layers = [ ...
sequenceInputLayer(numFeatures)
lstmLayer(50,"OutputMode","last")
fullyConnectedLayer(numel(unique(labelsTrain)))
softmaxLayer
classificationLayer];options = trainingOptions("adam", ...
"Shuffle","every-epoch", ...
"ValidationData",featuresValidation,labelsValidation, ...
"Plots","training-progress", ...
"MaxEpochs", 100,...
"Verbose",false);net = trainNetwork(featuresTrain,labelsTrain,layers,options);
4、参考论文
略
以上是关于matlab 深度学习做声音分类的主要内容,如果未能解决你的问题,请参考以下文章
DELM分类基于matlab麻雀搜索算法改进深度学习极限学习机数据分类含Matlab源码 2235期
信号识别基于matlab深度学习CNN信号调制分类含Matlab源码 2066期