Julius 4.2
|
00001 00054 /* 00055 * Copyright (c) 1991-2011 Kawahara Lab., Kyoto University 00056 * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology 00057 * Copyright (c) 2005-2011 Julius project team, Nagoya Institute of Technology 00058 * All rights reserved 00059 */ 00060 00061 #ifndef __SENT_HTK_PARAM_H__ 00062 #define __SENT_HTK_PARAM_H__ 00063 00064 #include <sent/stddefs.h> 00065 #include <sent/htk_defs.h> 00066 00068 typedef struct { 00069 unsigned int samplenum; 00070 unsigned int wshift; 00071 unsigned short sampsize; 00072 short samptype; 00073 } HTK_Param_Header; 00074 00076 typedef struct { 00077 HTK_Param_Header header; 00078 unsigned int samplenum; 00079 short veclen; 00080 VECT **parvec; 00081 short veclen_alloc; 00082 unsigned int samplenum_alloc; 00083 BMALLOC_BASE *mroot; 00084 } HTK_Param; 00085 00090 #define HTK_PARAM_INCREMENT_STEP_FRAME 200 00091 00092 #ifdef __cplusplus 00093 extern "C" { 00094 #endif 00095 00096 boolean rdparam(char *, HTK_Param *); 00097 HTK_Param *new_param(); 00098 void free_param(HTK_Param *); 00099 short param_qualstr2code(char *); 00100 short param_str2code(char *); 00101 char *param_qualcode2str(char *, short, boolean); 00102 char *param_code2str(char *, short, boolean); 00103 int guess_basenum(HTK_Param *p, short qualtype); 00104 boolean param_strip_zero(HTK_Param *param); 00105 00106 void param_init_content(HTK_Param *p); 00107 boolean param_alloc(HTK_Param *p, unsigned int samplenum, short veclen); 00108 void param_free_content(HTK_Param *p); 00109 00110 00111 /* hmminfo/put_htkdata_info.c */ 00112 void put_param_head(FILE *fp, HTK_Param_Header *h); 00113 void put_vec(FILE *fp, VECT **p, int num, short veclen); 00114 void put_param(FILE *fp, HTK_Param *pinfo); 00115 void put_param_info(FILE *fp, HTK_Param *pinfo); 00116 00117 #ifdef __cplusplus 00118 } 00119 #endif 00120 00121 #endif /* __SENT_HTK_PARAM_H__ */