1 /** 2 * @file htk_defs.h 3 * 4 * <EN> 5 * @brief Symbol definitions for HTK HMM and HTK parameter 6 * 7 * This file defines symbols for HMM parameter definition needed 8 * for both HMM definition file and HMM parameter file. 9 * 10 * @sa htk_hmm.h 11 * @sa htk_param.h 12 * </EN> 13 * <JA> 14 * @brief HTK����ħ�ѥ����η����˴ؤ������ 15 * 16 * ���Υե�����ˤ�, HTK������HMM����ե�����,���뤤��HTK������ 17 * �ѥ����ե�������ɤ߹���ݤ�ɬ�פ�,�ѥ������˴�Ϣ���� 18 * �����Ǽ����Ƥ��ޤ��� 19 * 20 * @sa htk_hmm.h 21 * @sa htk_param.h 22 * </JA> 23 * 24 * @author Akinobu LEE 25 * @date Thu Feb 10 19:36:47 2005 26 * 27 * $Revision: 1.3 $ 28 * 29 */ 30 /* 31 * Copyright (c) 1991-2007 Kawahara Lab., Kyoto University 32 * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology 33 * Copyright (c) 2005-2007 Julius project team, Nagoya Institute of Technology 34 * All rights reserved 35 */ 36 37 #ifndef __SENT_HTK_DEFS_H__ 38 #define __SENT_HTK_DEFS_H__ 39 40 /// Definition of input parameter types derived from HTK 41 enum parameter_type { 42 F_WAVEFORM, ///< Waveform format 43 F_LPC, ///< LPC --- linear prediction coef. 44 F_LPREFC, ///< linear prediction refrection coef. 45 F_LPCEPSTRA, ///< LPC cepstrum 46 F_LPDELCEP, 47 F_IREFC, 48 F_MFCC, ///< mel-frequency cepstral coef. 49 F_FBANK, ///< log-scale filterbank parameter 50 F_MELSPEC, ///< mel-scale filterbank parameter 51 F_USER, 52 F_DISCRETE, ///< discrete 53 F_ERR_INVALID ///< ERROR 54 }; 55 56 /* Additional parameter qualifiers */ 57 #define F_ENERGY 0x0040 ///< @c _E log energy coef. 58 #define F_ENERGY_SUP 0x0080 ///< @c _N (with _E) suppress absolute energy 59 #define F_DELTA 0x0100 ///< @c _D delta (first-order regression) coef. 60 #define F_ACCL 0x0200 ///< @c _A (with _D) acceleration (second-order) coef. 61 #define F_COMPRESS 0x0400 ///< @c _C compressed 62 #define F_CEPNORM 0x0800 ///< @c _Z cepstral mean normalization 63 #define F_CHECKSUM 0x1000 ///< @c _K CRC checksum added 64 #define F_ZEROTH 0x2000 ///< @c _0 (with MFCC) 0'th cepstral parameter 65 66 #define F_BASEMASK 0x003f ///< Mask to extract qualifiers 67 68 /// Covariance matrix types: only C_INV_DIAG is supported in Julius 69 enum { 70 C_DIAG_C, ///< (not supported) Diagonal covariance 71 C_INV_DIAG, ///< Inversed diagonal covaritance 72 C_FULL, ///< (not supported) Full covariance 73 C_LLT, ///< (not supported) 74 C_XFORM}; ///< (not supported) 75 76 /// Duration model types: No duration model is supported in Julius, so only D_NULL is acceptable 77 enum { 78 D_NULL, ///< No duration model 79 D_POISSON, ///< (not supported) 80 D_GAMMA, ///< (not supported) 81 D_GEN}; ///< (not supported) 82 83 /** 84 * @brief Structure for decoding/encoding parameter type code 85 * 86 * @sa libsent/src/anlz/paramtypes.c 87 * @sa libsent/src/hmminfo/rdhmmdef_options.c 88 */ 89 typedef struct { 90 char *name; ///< Name string used in HTK hmmdefs 91 short type; ///< Type code (one of definitions above) 92 char *desc; ///< Brief description for user */ 93 boolean supported; ///< TRUE if this is supported in Julius 94 } OptionStr; 95 96 /// Header string to detect binary HMM file 97 #define BINHMM_HEADER "JBINHMM\n" 98 99 /// Header string for binary HMM file V2 (parameter embedded) 100 #define BINHMM_HEADER_V2 "JBINHMMV2" 101 102 /// A header qualifier string for V2: acoustic analysis parameter embedded 103 #define BINHMM_HEADER_V2_EMBEDPARA 'P' 104 105 /// A header qualifier string for V2: variance inversed 106 #define BINHMM_HEADER_V2_VARINV 'V' 107 108 /// A header qualifier string for V2: has mixture pdf macro def 109 #define BINHMM_HEADER_V2_MPDFMACRO 'M' 110 111 /// Maximum number of input stream 112 #define MAXSTREAMNUM 50 113 114 #ifdef ENABLE_MSD 115 #define LZERO (-1.0E10) ///< log(0) value of void dimension for MSD-HMM */ 116 #endif 117 118 #endif /* __SENT_HTK_DEFS_H__ */ 119