function MFCCs = extract_mfcc()
filePath='D:\data\tooth\rand_test\train_10\traintxt\Hhf\*.txt';
pathStr='D:\data\tooth\rand_test\train_10\traintxt\Hhf\';
fileList=dir(filePath);
fileNum=length(fileList);
MFCCs = [];
hamming = @(N)(0.54-0.46*cos(2*pi*[0:N-1].'/(N-1)));
for i=1:1:fileNum
name=fileList(i).name;
fileName=strcat(pathStr,name);
data=dlmread(fileName);
[ CC, FBE, frames ] = mfcc(data,44100,10,5,0.97,hamming,[100,10000],20,13,22);
MFCCs = [MFCCs,mean(CC')'];
end
MFCCs = MFCCs';
save('MFCCs.mat');
MFCC特征提取的MATLAB代码
最新推荐文章于 2024-06-05 21:39:39 发布