Struct aubio_rs::MFCC [−][src]
pub struct MFCC { /* fields omitted */ }
MFCC object
Mel-Frequency Cepstrum Coefficients object.
This object computes MFCC coefficients on an input CVec.
The implementation follows the specifications established by Malcolm Slaney in its Auditory Toolbox, available online at the following address (see file mfcc.m):
Implementations
impl MFCC
[src]
impl MFCC
[src]pub fn new(
buf_size: usize,
n_filters: usize,
n_coeffs: usize,
sample_rate: u32
) -> Result<Self>
[src]
buf_size: usize,
n_filters: usize,
n_coeffs: usize,
sample_rate: u32
) -> Result<Self>
Create MFCC object
buf_size
Size of analysis buffer (and length the FFT transform)n_filters
Number of desired filtersn_coeffs
Number of desired coefficientssamplerate
Audio sampling rate
pub fn with_power(self, power: Smpl) -> Self
[src]
Set power parameter
pub fn with_scale(self, scale: Smpl) -> Self
[src]
Set scaling parameter
pub fn with_mel_coeffs(self, fmin: Smpl, fmax: Smpl) -> Self
[src]
Mel filterbank initialization
fmin
Start frequency, in Hzfmax
End frequency, in Hz
The filterbank will be initialized with bands linearly spaced in the mel scale, from fmin
to fmax
.
pub fn with_mel_coeffs_htk(self, fmin: Smpl, fmax: Smpl) -> Self
[src]
Mel filterbank initialization
fmin
Start frequency, in Hzfmax
End frequency, in Hz
The bank of filters will be initalized to to cover linearly spaced bands in the Htk mel scale, from fmin
to fmax
.
pub fn with_mel_coeffs_slaney(self) -> Self
[src]
Mel filterbank initialization (Auditory Toolbox’s parameters)
The filter coefficients are built to match exactly Malcolm Slaney’s Auditory Toolbox implementation. The number of filters should be 40.
This is the default filterbank when mf was created with n_filters = 40
.
pub fn do_<'i, 'o, I, O>(&mut self, input: I, output: O) -> Status where
I: Into<CVec<'i>>,
O: Into<FVecMut<'o>>,
[src]
I: Into<CVec<'i>>,
O: Into<FVecMut<'o>>,
MFCC object processing
in
Input spectrum (buf_size
long)out
Output mel coefficients buffer (n_coeffs
long)
pub fn set_power(&mut self, power: Smpl)
[src]
Set power parameter
pub fn get_power(&self) -> Smpl
[src]
Get power parameter
pub fn set_scale(&mut self, scale: Smpl)
[src]
Set scaling parameter
pub fn get_scale(&self) -> Smpl
[src]
Get scaling parameter
pub fn set_mel_coeffs(&mut self, fmin: Smpl, fmax: Smpl)
[src]
Mel filterbank initialization
fmin
Start frequency, in Hzfmax
End frequency, in Hz
The filterbank will be initialized with bands linearly spaced in the mel scale, from fmin
to fmax
.
pub fn set_mel_coeffs_htk(&mut self, fmin: Smpl, fmax: Smpl)
[src]
Mel filterbank initialization
fmin
Start frequency, in Hzfmax
End frequency, in Hz
The bank of filters will be initalized to to cover linearly spaced bands in the Htk mel scale, from fmin
to fmax
.
pub fn set_mel_coeffs_slaney(&mut self)
[src]
Mel filterbank initialization (Auditory Toolbox’s parameters)
The filter coefficients are built to match exactly Malcolm Slaney’s Auditory Toolbox implementation. The number of filters should be 40.
This is the default filterbank when mf was created with n_filters = 40
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MFCC
impl RefUnwindSafe for MFCC
impl UnwindSafe for MFCC
impl UnwindSafe for MFCC