source: tests/src/test-mfcc.c @ b14107f

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since b14107f was 2828382, checked in by Paul Brossier <piem@piem.org>, 15 years ago

tests/src/: update mfcc

  • Property mode set to 100644
File size: 852 bytes
RevLine 
[0028ea7]1#include <aubio.h>
2
3int
4main (void)
5{
6  /* allocate some memory */
7  uint_t win_s = 512;           /* fft size */
8  uint_t channels = 1;          /* number of channel */
9  uint_t n_filters = 40;        /* number of filters */
10  uint_t n_coefs = 13;          /* number of coefficients */
11  cvec_t *in = new_cvec (win_s, channels);      /* input buffer */
12  fvec_t *out = new_fvec (n_coefs, channels);     /* input buffer */
13  smpl_t samplerate = 16000.;
14  uint_t i = 0;
15
16  /* allocate fft and other memory space */
[2828382]17  aubio_mfcc_t *o = new_aubio_mfcc (win_s, n_filters, n_coefs, samplerate);
[0028ea7]18
19  for (i = 0; i < in->length; i ++) {
20    in->norm[0][i] = 1.;
21  }
22
23  aubio_mfcc_do (o, in, out);
[38e9732]24  fvec_print (out);
25  aubio_mfcc_do (o, in, out);
[0028ea7]26  fvec_print (out);
27
28  del_aubio_mfcc (o);
29  del_cvec (in);
30  del_fvec (out);
31  aubio_cleanup ();
32
33  return 0;
34}
Note: See TracBrowser for help on using the repository browser.