1 #ifndef _MFCC_DATA_H_ 2 #define _MFCC_DATA_H_ 3 4 {% macro iff16(s,c) -%} 5 {%- if configs[s][c]["hasF16"] %} 6 #if defined(ARM_FLOAT16_SUPPORTED) 7 {%- endif %} 8 {% endmacro -%} 9 10 {% macro endiff16(s,c) -%} 11 {%- if configs[s][c]["hasF16"] %} 12 #endif /*defined(ARM_FLOAT16_SUPPORTED) */ 13 {%- endif %} 14 {% endmacro -%} 15 16 #include "arm_math_types.h" 17 18 {% if configs["hasF16"] %} 19 #include "arm_math_types_f16.h" 20 {% endif %} 21 22 #ifdef __cplusplus 23 extern "C" 24 { 25 #endif 26 27 28 /***** 29 30 DCT COEFFICIENTS FOR THE MFCC 31 32 *****/ 33 34 {% for config in configs["dct"] %} 35 {{iff16("dct",config)}} 36 #define NB_MFCC_DCT_COEFS_{{config.upper()}} {{configs["dct"][config]['dctMatrixLength']}} 37 extern const {{configs["dct"][config]["ctype"]}} mfcc_dct_coefs_{{config}}[NB_MFCC_DCT_COEFS_{{config.upper()}}]; 38 {{endiff16("dct",config)}} 39 40 {% endfor %} 41 42 /***** 43 44 WINDOW COEFFICIENTS 45 46 *****/ 47 48 {% for config in configs["window"] %} 49 {{iff16("window",config)}} 50 #define NB_MFCC_WIN_COEFS_{{config.upper()}} {{configs["window"][config]['fftlength']}} 51 extern const {{configs["window"][config]["ctype"]}} mfcc_window_coefs_{{config}}[NB_MFCC_WIN_COEFS_{{config.upper()}}]; 52 {{endiff16("window",config)}} 53 54 {% endfor %} 55 56 /***** 57 58 MEL FILTER COEFFICIENTS FOR THE MFCC 59 60 *****/ 61 62 {% for config in configs["melfilter"] %} 63 #define NB_MFCC_NB_FILTER_{{config.upper()}} {{configs["melfilter"][config]['melFilters']}} 64 extern const uint32_t mfcc_filter_pos_{{config}}[NB_MFCC_NB_FILTER_{{config.upper()}}]; 65 extern const uint32_t mfcc_filter_len_{{config}}[NB_MFCC_NB_FILTER_{{config.upper()}}]; 66 67 {% endfor %} 68 69 70 71 {% for config in configs["melfilter"] %} 72 {{iff16("melfilter",config)}} 73 #define NB_MFCC_FILTER_COEFS_{{config.upper()}} {{configs["melfilter"][config]['totalLen']}} 74 extern const {{configs["melfilter"][config]["ctype"]}} mfcc_filter_coefs_{{config}}[NB_MFCC_FILTER_COEFS_{{config.upper()}}]; 75 {{endiff16("melfilter",config)}} 76 77 {% endfor %} 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif 84 85