Hello,
I applied pitch feature extraction to audio files. Now I want to apply PCA (for dimensionality reduction) to the pitch features. How can I do that? The problem is that I cannot save the features in csv or mat file. Also, the new audio feature replace the previous audio features thus giving me only feature vector i.e; comp_PCA1 gives me feature vector of 32600×1. But my files are 94 so the output should be 32600×94.
My code is given below:
clcclear allpath_to_directory= dir ('**/*.wav'); % path to the directory
for i = 1:length(path_to_directory) path= strcat(path_to_directory(i).folder, '\', path_to_directory(i).name); [signal, Fs]= audioread(path); % audio read here
pitch = pwelch(signal); % pitch feature extraction part
[coeff,score] = pca(pitch); % pca for dimensionality reduction
Comp_PCA1 = score(:,1);% % y (i,:)= coeff;
end
Best Answer