I propose a much simpler solution for cleaning your dataset. After looking at some of your windy files it is very apparent that there are 2 things that stick out to me compared to the non-windy files.
- The number of times the audio clips per file.
- The power/energy in the frequency bins below 550 Hz.
My approach for cleaning your dataset would be to do two things:
- Count the number of times the audio file clips.
- Compute the power spectrum for each file and sum up the power in the frequency bins from 1-550 Hz.
You can easily see that files which have a high number of clips/file and at the same time a lot of power in the lower frequency bands are the ones that are most likely containing a lot of wind (see results below).
You could implement a small script running through all of your files, computing the above mentioned values in any programming language such as Python, Matlab, R, ...
Matlab Code
fname = '/path/to/file.wav';
[y,fs] = audioread(fname);
n_clip = length(find(y>0.95));
window_fct = hamming(floor(length(y)/128));
overlap = 0.9;
nfft = 2^16;
[pxx,fx] = pwelch(y,window_fct,floor(overlap*length(window_fct)),nfft,fs);
pxx = 10*log10(pxx);
fx_relevant = find(fx<550);
P_below_550 = sum(pxx(fx_relevant));
Results
File path |
Audio > 0.95 |
Power < 550 Hz |
"/tmp/biostack/STP03_20230328_1950362_nowind_eds.wav" |
2 |
-62843 |
"/tmp/biostack/STP03_20230328_1950363_nowind_eds.wav" |
0 |
-61881 |
"/tmp/biostack/STP03_20230328_1950364_nowind_eds.wav" |
0 |
-61739 |
"/tmp/biostack/STP03_20230328_195036_nowind_eds.wav" |
0 |
-62573 |
"/tmp/biostack/STP03_20230329_19300210_nowind_eds.wav" |
82 |
-51638 |
"/tmp/biostack/STP03_20230329_1930025_nowind_eds.wav" |
601 |
-43343 |
"/tmp/biostack/STP03_20230329_1930026_nowind_eds.wav" |
316 |
-45589 |
"/tmp/biostack/STP03_20230329_1930027_nowind_eds.wav" |
0 |
-60587 |
"/tmp/biostack/STP03_20230329_1930028_nowind_eds.wav" |
0 |
-58075 |
"/tmp/biostack/STP03_20230329_1930029_nowind_eds.wav" |
0 |
-61481 |
"/tmp/biostack/STP06_20230225_1930022_windy_noeds.wav" |
1147 |
-35458 |
"/tmp/biostack/STP06_20230225_1930023_windy_noeds.wav" |
1224 |
-34735 |
"/tmp/biostack/STP06_20230225_1930024_windy_noeds.wav" |
1137 |
-34696 |
"/tmp/biostack/STP06_20230225_193002_windy_noeds.wav" |
490 |
-36425 |
"/tmp/biostack/STP06_20230226_0500024_windy_eds.wav" |
7146 |
-30641 |
"/tmp/biostack/STP06_20230226_0500025_windy_eds.wav" |
4020 |
-31998 |
"/tmp/biostack/STP06_20230301_0530026_windy_eds.wav" |
488 |
-36449 |
"/tmp/biostack/STP06_20230301_0530027_windy_eds.wav" |
483 |
-36905 |
"/tmp/biostack/STP06_20230301_0530028_windy_eds.wav" |
779 |
-35878 |
"/tmp/biostack/STP06_20230301_0530029_windy_eds.wav" |
200 |
-38538 |
"/tmp/biostack/STP06_20230312_053002_windy_noeds.wav" |
879 |
-34816 |