Home > ACA-Code > FeatureSpectralKurtosis.m

FeatureSpectralKurtosis

PURPOSE ^

computes the spectral kurtosis from the magnitude spectrum

SYNOPSIS ^

function [vsk] = FeatureSpectralKurtosis (X, f_s)

DESCRIPTION ^

computes the spectral kurtosis from the magnitude spectrum
> called by ::ComputeFeature
>
> @param X: spectrogram (dimension FFTLength X Observations)
> @param f_s: sample rate of audio data (unused)
>
> @retval vsk spectral kurtosis
 ======================================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %computes the spectral kurtosis from the magnitude spectrum
0002 %> called by ::ComputeFeature
0003 %>
0004 %> @param X: spectrogram (dimension FFTLength X Observations)
0005 %> @param f_s: sample rate of audio data (unused)
0006 %>
0007 %> @retval vsk spectral kurtosis
0008 % ======================================================================
0009 function [vsk] = FeatureSpectralKurtosis (X, f_s)
0010     
0011     % compute mean and standard deviation
0012     mu_X = FeatureSpectralCentroid(X, f_s) * 2 / f_s * (size(X, 1)-1);
0013     std_X = FeatureSpectralSpread(X, f_s) * 2 / f_s * (size(X, 1)-1);
0014     tmp = repmat(0:size(X, 1)-1, size(X, 2), 1) - repmat(mu_X, size(X, 1), 1)';
0015     
0016     vsk = sum((tmp.^4)'.*X)' ./ (std_X'.^4 .* sum(X, 1)'*size(X, 1))-3;
0017 
0018     vsk = vsk';
0019        
0020     % avoid NaN for silence frames
0021     vsk (sum(X, 1) == 0) = 0;
0022     
0023 end
0024

Generated on Fri 22-Apr-2022 20:59:51 by m2html © 2005