APPLY EMPIRICAL MODE DECOMPOSITION TO EACH SPEECH FRAME
2 次查看(过去 30 天)
显示 更早的评论
Hello, please i tried to use the below code to apply empirical mode decomposition(emd) to each speech frame and after calculate the mean of the instrinsic mode decomposition of each frame for every file in the folder but i cannot, please i need help. Thank you very much.
clc;
clear all;
% Specify the folder where the files live.
myFolder = '/MATLAB Drive/AUDIO2';
% Check to make sure that folder actually exists. Warn user if it doesn't.
if ~isfolder(myFolder)
errorMessage = sprintf('Error: The following folder does not exist:\n%s\nPlease specify a new folder.', myFolder);
uiwait(warndlg(errorMessage));
myFolder = uigetdir(); % Ask for a new one.
if myFolder == 0
% User clicked Cancel
return;
end
end
% Get a list of all files in the folder with the desired file name pattern.
filePattern = fullfile(myFolder, '**/*.wav'); % Change to whatever pattern you need.
theFiles = dir(filePattern);
AudioArray = cell(1, numel(theFiles));
i=1;
j=1;
o=1;
r=1;
u=1;
for k = 1 : numel(theFiles) % NUMEL is more direct than LENGTH
baseFileName = theFiles(k).name;
fullFileName = fullfile(theFiles(k).folder, baseFileName);
AudioArray{k} = audioread(fullFileName);
[speech, fs] = audioread(fullFileName);
%frame with buffer
X = buffer(speech, 400, 50);
[imf,residual] = emd(X,'MaxNumIMF',5);
X1=imf(:,1);
X2=imf(:,2);
X3=imf(:,3);
X4=imf(:,4);
X5=imf(:,5);
% do framing
end
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Signal Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!