Audio Core Feature Interface Reference Manual  jpl-r3.19.2
librosa::Feature Class Reference

Static Public Member Functions

static std::vector< std::vector< std::complex< float > > > stft (std::vector< float > &x, int n_fft, int n_hop, int window_length, const std::string &win, bool center, const std::string &mode)
 short-time fourier transform similar with librosa.feature.stft More...
 
static std::vector< std::vector< float > > melspectrogram (std::vector< float > &x, Matrixf &sp, int sr, int n_fft, int n_hop, int window_length, const std::string &win, bool center, const std::string &mode, float power, int n_mels, int fmin, int fmax)
 compute mel spectrogram similar with librosa.feature.melspectrogram More...
 
static std::vector< float > zeroCrossingRate (std::vector< float > &x, int frame_length, int hop_length, int pad)
 
static std::vector< float > rms (std::vector< float > &x, int frame_length, int hop_length)
 
static std::vector< std::vector< float > > mfcc (std::vector< float > &x, int sr, int n_fft, int n_hop, int window_length, const std::string &win, bool center, const std::string &mode, float power, int n_mels, int fmin, int fmax, int n_mfcc, bool norm, int type)
 compute mfcc similar with librosa.feature.mfcc More...
 
static Vectorf spectralCentroid (Matrixf &sp, Vectorf &fft_freqs)
 
static std::vector< float > spectralRolloff (Matrixf &sp, Vectorf &fft_freqs, float roll_percent)
 
static std::vector< float > spectralBandwidth (Matrixf &sp, Vectorf &centroid, Vectorf &fft_freqs)
 

Member Function Documentation

static std::vector<std::vector<float> > librosa::Feature::melspectrogram ( std::vector< float > &  x,
Matrixf &  sp,
int  sr,
int  n_fft,
int  n_hop,
int  window_length,
const std::string &  win,
bool  center,
const std::string &  mode,
float  power,
int  n_mels,
int  fmin,
int  fmax 
)
inlinestatic

compute mel spectrogram similar with librosa.feature.melspectrogram

Parameters
xinput audio signal
srsample rate of 'x'
n_fftlength of the FFT size
n_hopnumber of samples between successive frames
winwindow function. currently only supports 'hann'
centersame as librosa
modepad mode. support "reflect","symmetric","edge"
powerexponent for the magnitude melspectrogram
n_melsnumber of mel bands
f_minlowest frequency (in Hz)
f_maxhighest frequency (in Hz)
Returns
mel spectrogram matrix
static std::vector<std::vector<float> > librosa::Feature::mfcc ( std::vector< float > &  x,
int  sr,
int  n_fft,
int  n_hop,
int  window_length,
const std::string &  win,
bool  center,
const std::string &  mode,
float  power,
int  n_mels,
int  fmin,
int  fmax,
int  n_mfcc,
bool  norm,
int  type 
)
inlinestatic

compute mfcc similar with librosa.feature.mfcc

Parameters
xinput audio signal
srsample rate of 'x'
n_fftlength of the FFT size
n_hopnumber of samples between successive frames
winwindow function. currently only supports 'hann'
centersame as librosa
modepad mode. support "reflect","symmetric","edge"
powerexponent for the magnitude melspectrogram
n_melsnumber of mel bands
f_minlowest frequency (in Hz)
f_maxhighest frequency (in Hz)
n_mfccnumber of mfccs
normortho-normal dct basis
typedct type. currently only supports 'type-II'
Returns
mfcc matrix
static std::vector<std::vector<std::complex<float> > > librosa::Feature::stft ( std::vector< float > &  x,
int  n_fft,
int  n_hop,
int  window_length,
const std::string &  win,
bool  center,
const std::string &  mode 
)
inlinestatic

short-time fourier transform similar with librosa.feature.stft

Parameters
xinput audio signal
n_fftlength of the FFT size
n_hopnumber of samples between successive frames
winwindow function. currently only supports 'hann'
centersame as librosa
modepad mode. support "reflect","symmetric","edge"
Returns
complex-valued matrix of short-time fourier transform coefficients.

The documentation for this class was generated from the following file: