Struct bliss_audio_aubio_rs::MFCC[][src]

pub struct MFCC { /* fields omitted */ }
Expand description

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):

https://engineering.purdue.edu/~malcolm/interval/1998-010/

Implementations

impl MFCC[src]

pub fn new(
    buf_size: usize,
    n_filters: usize,
    n_coeffs: usize,
    sample_rate: u32
) -> Result<Self>
[src]

Create MFCC object

  • buf_size Size of analysis buffer (and length the FFT transform)
  • n_filters Number of desired filters
  • n_coeffs Number of desired coefficients
  • samplerate 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 Hz
  • fmax 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 Hz
  • fmax 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]

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 Hz
  • fmax 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 Hz
  • fmax 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

impl Drop for MFCC[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl RefUnwindSafe for MFCC

impl !Send for MFCC

impl !Sync for MFCC

impl Unpin for MFCC

impl UnwindSafe for MFCC

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.