2 Copyright (C) 2007-2013 Paul Brossier <piem@aubio.org>
3 and Amaury Hazan <ahazan@iua.upf.edu>
5 This file is part of aubio.
7 aubio is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 aubio is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with aubio. If not, see <http://www.gnu.org/licenses/>.
24 Mel-Frequency Cepstrum Coefficients object
26 This object computes MFCC coefficients on an input cvec_t.
28 The implementation follows the specifications established by Malcolm Slaney
29 in its Auditory Toolbox, available online at the following address (see
32 https://engineering.purdue.edu/~malcolm/interval/1998-010/
34 \example spectral/test-mfcc.c
47 typedef struct _aubio_mfcc_t aubio_mfcc_t;
49 /** create mfcc object
51 \param buf_size size of analysis buffer (and length the FFT transform)
52 \param samplerate audio sampling rate
53 \param n_coeffs number of desired coefficients
54 \param n_filters number of desired filters
57 aubio_mfcc_t *new_aubio_mfcc (uint_t buf_size,
58 uint_t n_filters, uint_t n_coeffs, uint_t samplerate);
60 /** delete mfcc object
62 \param mf mfcc object as returned by new_aubio_mfcc
65 void del_aubio_mfcc (aubio_mfcc_t * mf);
67 /** mfcc object processing
69 \param mf mfcc object as returned by new_aubio_mfcc
70 \param in input spectrum (buf_size long)
71 \param out output mel coefficients buffer (n_coeffs long)
74 void aubio_mfcc_do (aubio_mfcc_t * mf, const cvec_t * in, fvec_t * out);
76 uint_t aubio_mfcc_set_power (aubio_mfcc_t *mf, smpl_t power);
77 uint_t aubio_mfcc_get_power (aubio_mfcc_t *mf);
79 uint_t aubio_mfcc_set_mel_coeffs (aubio_mfcc_t *mf, smpl_t freq_min,
81 uint_t aubio_mfcc_set_mel_coeffs_htk (aubio_mfcc_t *mf, smpl_t freq_min,
83 uint_t aubio_mfcc_set_mel_coeffs_slaney (aubio_mfcc_t *mf);
89 #endif /* AUBIO_MFCC_H */