Code covered by the BSD License
-
Energy_Entropy_Block(f,winLen...
-
ShortTimeEnergy(signal, windo...
-
SpectralCentroid(signal,windo...
-
SpectralEntropy(signal,window...
-
SpectralFlux(signal,windowLen...
-
SpectralRollOff(signal,window...
-
computeAllStatistics(fileName...
This function computes the average and std values for the following audio
-
computeFeaturesDirectory(clas...
% This function computes the audio features (6-D vector) for each .wav
-
computeHistError(Data1, Data2...
define histogram beans
-
myHist(Data)
-
statistic(feature, Start, End...
-
zcr(signal,windowLength, step...
-
Some Basic Audio Features
-
View all files
from
Some Basic Audio Features
by Theodoros Giannakopoulos
Use the provided m-files for computing the features of an audio classification problem
|
| SpectralEntropy(signal,windowLength,windowStep, fftLength, numOfBins);
|
function En = SpectralEntropy(signal,windowLength,windowStep, fftLength, numOfBins);
signal = signal / max(abs(signal));
curPos = 1;
L = length(signal);
numOfFrames = floor((L-windowLength)/windowStep) + 1;
H = hamming(windowLength);
En = zeros(numOfFrames,1);
h_step = fftLength / numOfBins;
for (i=1:numOfFrames)
window = (H.*signal(curPos:curPos+windowLength-1));
fftTemp = abs(fft(window,2*fftLength));
fftTemp = fftTemp(1:fftLength);
S = sum(fftTemp);
for (j=1:numOfBins)
x(j) = sum(fftTemp((j-1)*h_step + 1: j*h_step)) / S;
end
En(i) = -sum(x.*log2(x));
curPos = curPos + windowStep;
end
|
|
Contact us at files@mathworks.com