38#ifndef __FE_INTERNAL_H__
39#define __FE_INTERNAL_H__
45#include "sphinxbase/fe.h"
46#include "sphinxbase/fixpoint.h"
59typedef int16 window_t;
60typedef int32 powspec_t;
61typedef struct { int16 r, i; }
complex;
62#elif defined(FIXED_POINT)
63typedef fixed32 frame_t;
64typedef int32 powspec_t;
65typedef fixed32 window_t;
66typedef struct { fixed32 r, i; }
complex;
68typedef float64 frame_t;
69typedef float64 powspec_t;
70typedef float64 window_t;
71typedef struct { float64 r, i; }
complex;
90 float32 sampling_rate;
94 float32 lower_filt_freq;
95 float32 upper_filt_freq;
105 char const *warp_type;
106 char const *warp_params;
109 mfcc_t sqrt_inv_n, sqrt_inv_2n;
121#define SQRT_HALF FLOAT2MFCC(0.707106781186548)
128 float32 sampling_rate;
132 float32 window_length;
137 uint8 feature_dimension;
145 float32 pre_emphasis_alpha;
157 window_t *hamming_window;
163 powspec_t *spec, *mfspec;
164 int16 *overflow_samps;
165 int16 num_overflow_samps;
169#define BB_SAMPLING_RATE 16000
170#define DEFAULT_BB_FFT_SIZE 512
171#define DEFAULT_BB_FRAME_SHIFT 160
172#define DEFAULT_BB_NUM_FILTERS 40
173#define DEFAULT_BB_LOWER_FILT_FREQ 133.33334
174#define DEFAULT_BB_UPPER_FILT_FREQ 6855.4976
176#define NB_SAMPLING_RATE 8000
177#define DEFAULT_NB_FFT_SIZE 256
178#define DEFAULT_NB_FRAME_SHIFT 80
179#define DEFAULT_NB_NUM_FILTERS 31
180#define DEFAULT_NB_LOWER_FILT_FREQ 200
181#define DEFAULT_NB_UPPER_FILT_FREQ 3500
183void fe_init_dither(int32 seed);
186int32 fe_dither(int16 *buffer, int32 nsamps);
189int fe_read_frame(
fe_t *fe, int16
const *in, int32 len);
192int fe_shift_frame(
fe_t *fe, int16
const *in, int32 len);
195int32 fe_write_frame(
fe_t *fe, mfcc_t *fea);
198int32 fe_build_melfilters(
melfb_t *MEL_FB);
199int32 fe_compute_melcosine(
melfb_t *MEL_FB);
200void fe_create_hamming(window_t *in, int32 in_len);
201void fe_create_twiddle(
fe_t *fe);
204void fe_spec2cep(
fe_t * fe,
const powspec_t * mflogspec, mfcc_t * mfcep);
205void fe_dct2(
fe_t *fe,
const powspec_t *mflogspec, mfcc_t *mfcep,
int htk);
206void fe_dct3(
fe_t *fe,
const mfcc_t *mfcep, powspec_t *mflogspec);
Opaque structure used to hold the results of command-line parsing.
Structure for the front-end computation.
Base Struct to hold all structure for MFCC computation.