%% Spectral Kurtosis of Time-Domain Audio
% Read in an audio file, calculate the kurtosis using default parameters, and then plot the results.

[audioIn,fs] = audioread('Counting-16-44p1-mono-15secs.wav');
kurtosis = spectralKurtosis(audioIn,fs);

t = linspace(0,size(audioIn,1)/fs,size(kurtosis,1));
plot(t,kurtosis)
xlabel('Time (s)')
ylabel('Kurtosis')

%
% Copyright 2018 The MathWorks, Inc.