How to extract feature from audio signal

9 views (last 30 days)
I'm trying to extract normal state(without equipment moving state) sound from mixed audio signal.
As you see in this picture, I want to extract marked signal(with red box) from mixed audio signal.
How can I extract certain signal?
%% Loading Original Wav Data from folder
Wav_files = dir(fullfile('C:\Users\Administrator\Desktop\Machine_Learning\Eunseob\data_set(single_axis_movement)\all\*.wav'));
for k=1:numel(Wav_files) % number of wave files in the given folder
info{k} = audioinfo(Wav_files(k).name);
[y{k}, Fs{k}] = audioread(Wav_files(k).name); % save each wave files as an data y{k}
Y{k} = fft(y{1, k}); % Fast fourier transform of each data in the y{k} and save each transformation in the Y{1, k}
% y{k} = y{k}/norm(y{k}); % Normalization of each audio data
sizes{k} = size(y{k}, 1); % Find size of each audio data
minValue = min(cell2mat(sizes)); % Find minimum size of audio data
%% Mixing all audio data
base = zeros(minValue, 1)
for i = 1:numel(Wav_files)
UnifiedAudio{i} = y{1, i}(1:minValue, :) % Unifying length of audio data(crop to minimum size)
MixedUnifiedAudio = base+UnifiedAudio{i};

Accepted Answer

Jyotish Kumar
Jyotish Kumar on 13 Nov 2019
Step 1: analyze the signal and see if you can determine what frequencies are to be kept and what frequencies are to be discarded. FFTs as well as possibly short-time Fourier transforms will be helpful here.
step 2: design a filter. start with a first order Butterworth lowpass filter, with a cutoff frequency that is between the frequency you think should be kept and the frequency you think should be discarded.
step 3: analyze the filtered signal the same way you analyzed the original signal to see what changed. Also play it back to hear the difference.
step 4: try some other types of filters to see if you can get something better than a 1st order Butterworth. e.g. try higher orders, different cutoff frequencies, and different filter types.
For more information, refer these links.

More Answers (0)


Find more on Audio I/O and Waveform Generation 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!

Translated by