Home > ACA-Code > FeatureSpectralCrestFactor.m

FeatureSpectralCrestFactor

PURPOSE ^

computes the spectral crest from the magnitude spectrum

SYNOPSIS ^

function [vtsc] = FeatureSpectralCrestFactor (X, f_s)

DESCRIPTION ^

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %computes the spectral crest 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 vtsc spectral crest factor
0008 % ======================================================================
0009 function [vtsc] = FeatureSpectralCrestFactor (X, f_s)
0010 
0011     % get maximum
0012     vtsc = max(X, [], 1) ./ sum(X, 1);
0013    
0014     % avoid NaN for silence frames
0015     vtsc (sum(X, 1) == 0) = 0;
0016 end
0017 
0018

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