htk_param.h

来自「julius version 4.12.about sound recognit」· C头文件 代码 · 共 114 行

H
114
字号
/** * @file   htk_param.h * * <EN> * @brief Structures for storing input speech parameters * * This file defines a structure for holding a vector sequence of * input speech parameters.  The speech parameter sequence will be * stored in HTK_Param.  The HTK_Param also holds information about * the extraction condition, i.e., frame shift length, window size and * so on. * * The speech input vector can be read from HTK parameter file, or * Julius extracts the parameters directly from input speech.  Julius * supports extraction of only MFCC format of fixed dimension. * More precisely, only parameter type of MFCC_{0|E}_D[_Z][_N] with {25|26} * dimensions is supported. * * When recognition, the parameter types of both acoustic model and * input parameter should be the same.  Please note that only the * parameter type is checked, and other parameters such as source sampling * rate, frame shift length and window sizes will not be checked. * </EN> * <JA> * @brief HTKの泼魔パラメ〖タを瘦积する菇陇挛に簇息する年盗 * * このファイルには·不兰泼魔翁のベクトル废误を瘦积する菇陇挛が * 年盗されていますˉ掐蜗不兰から纷换されたMFCC霹の不兰泼魔翁は· * ここで年盗される菇陇挛 HTK_Param に瘦赂されますˉHTK_Paramには * また·泼魔翁藐叫箕のフレ〖ムシフト升やウィンドウ墓などの攫鼠が * 瘦积されますˉ * * 不兰泼魔翁は嘲婶で HTK などによって藐叫されたHTK妨及の泼魔翁ファイルを * 粕み哈むことができますˉまた·MFCC 妨及であれば Julius 柒で * 木儡不兰侨妨から藐叫することができますˉ悸狠にJuliusが柒婶で藐叫する * することができる泼魔翁は {25|26} 肌傅の MFCC_{0|E}_D[_Z][_N] のみですˉ * * 蝗脱する不读モデル(%HMM)が池浆箕に脱いた泼魔翁と千急滦据とする掐蜗の * 泼魔翁の妨及は办米させる涩妥がありますˉ千急悸乖箕には·不读モデルと掐蜗 * ファイルの泼魔翁妨及がチェックされ·努圭しない眷圭はエラ〖となりますˉ * ただし·掐蜗不兰のサンプリング件侨眶やフレ〖ムシフト升·ウィンドウ墓の * 攫鼠はHTK妨及の不读モデルには瘦积されていないため·チェックできませんˉ * 庙罢して布さいˉ * </JA> * * @sa htk_defs.h * * @author Akinobu LEE * @date   Fri Feb 11 02:52:52 2005 * * $Revision: 1.2 $ *  *//* * Copyright (c) 1991-2007 Kawahara Lab., Kyoto University * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology * Copyright (c) 2005-2007 Julius project team, Nagoya Institute of Technology * All rights reserved */#ifndef __SENT_HTK_PARAM_H__#define __SENT_HTK_PARAM_H__#include <sent/stddefs.h>#include <sent/htk_defs.h>/// Parameter types and extraction conditionstypedef struct {  unsigned int samplenum;	///< Number of samples (or frames)  unsigned int wshift;		///< Window shift (unit: 100ns)   unsigned short sampsize;	///< Bytes per sample   short samptype;		///< Parameter type, see also htk_defs.h} HTK_Param_Header;/// Input speech parametertypedef struct {  HTK_Param_Header header;	///< Parameter header information  unsigned int samplenum;	///< Number of sample (same in header.samplenum)   short veclen;			///< Vector length of a sample  VECT **parvec;		///< Actual parameter vectors [0..samplenum-1][0..veclen-1]  short veclen_alloc;		///< Allocated vector length of a sample  unsigned int samplenum_alloc;	///< Alllocated number of samples  BMALLOC_BASE *mroot;		///< Pointer for block memory allocation} HTK_Param;/** * Increment step of HTK Parameter holder in frames *  */#define HTK_PARAM_INCREMENT_STEP_FRAME 200boolean rdparam(char *, HTK_Param *);HTK_Param *new_param();void free_param(HTK_Param *);short param_qualstr2code(char *);short param_str2code(char *);char *param_qualcode2str(char *, short, boolean);char *param_code2str(char *, short, boolean);int guess_basenum(HTK_Param *p, short qualtype);boolean param_strip_zero(HTK_Param *param);void param_init_content(HTK_Param *p);boolean param_alloc(HTK_Param *p, unsigned int samplenum, short veclen);void param_free_content(HTK_Param *p);/* hmminfo/put_htkdata_info.c */void put_param_head(FILE *fp, HTK_Param_Header *h);void put_vec(FILE *fp, VECT **p, int num, short veclen);void put_param(FILE *fp, HTK_Param *pinfo);void put_param_info(FILE *fp, HTK_Param *pinfo);#endif /* __SENT_HTK_PARAM_H__ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?