libsent/include/sent/htk_param.h File Reference

Structures for storing input speech parameters. More...

#include <sent/stddefs.h>
#include <sent/htk_defs.h>

Include dependency graph for htk_param.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HTK_Param_Header
 Parameter types and extraction conditions. More...
struct  HTK_Param
 Input speech parameter. More...

Functions

boolean rdparam (char *, HTK_Param *)
HTK_Paramnew_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)
HTK_Paramnew_select_param_kind (HTK_Param *src, short select_qualifier)
boolean select_param_vmark (HTK_Param *src, short dst_type)
int exec_exclude_one_vector (VECT *vec, int len)
 Execute deletion for one vector according to the exlusion marks.
int guess_basenum (HTK_Param *p, short qualtype)
boolean param_strip_zero (HTK_Param *param)
void put_param_head (HTK_Param_Header *h)
void put_vec (VECT **p, int num, short veclen)
void put_param (HTK_Param *pinfo)
void put_param_info (HTK_Param *pinfo)


Detailed Description

Structures for storing input speech parameters.

Author:
Akinobu LEE
Date:
Fri Feb 11 02:52:52 2005
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.

See also:
htk_defs.h
Revision
1.3

Definition in file htk_param.h.


Function Documentation

boolean rdparam ( char *  filename,
HTK_Param pinfo 
)

Top function to read a HTK parameter file.

Parameters:
filename [in] HTK parameter file name
pinfo [in] parameter data (already allocated by new_param())
Returns:
TRUE on success, FALSE on failure.

Definition at line 233 of file rdparam.c.

Referenced by main_recognition_loop().

HTK_Param* new_param (  ) 

Allocate a new parameter.

Returns:
pointer to the newly allocated area.

Definition at line 197 of file rdparam.c.

Referenced by init_param(), main_recognition_loop(), new_select_param_kind(), and new_wav2mfcc().

void free_param ( HTK_Param pinfo  ) 

Free the HTK parameter structure.

Parameters:
pinfo [in] parameter data to be destroyed.

Definition at line 212 of file rdparam.c.

Referenced by main_recognition_loop(), new_param_check_and_adjust(), and RealTimeTerminate().

short param_qualstr2code ( char *  s  ) 

Convert a qualifier string to a binary type code.

Parameters:
s [in] a string that contains qualifier strings like "_E_D_Z"
Returns:
the converted internal binary type code, F_ERR_INVALID if failed.

Definition at line 69 of file paramtypes.c.

Referenced by param_str2code().

short param_str2code ( char *  s  ) 

Convert a type string that contains basename and qualifiers to a binary type code.

Parameters:
s [in] a string that contains base and qualifier string like "MFCC_E_D_Z"
Returns:
the converted internal binary type code, F_ERR_INVALID if failed.

Definition at line 105 of file paramtypes.c.

Referenced by read_global_opt().

char* param_qualcode2str ( char *  buf,
short  type,
boolean  descflag 
)

Convert the qualifier part of a binary type code to string.

Parameters:
buf [out] buffer to store the resulting string (must have enough length)
type [in] binary type code to convert.
descflag [in] set to TRUE if you want result in description string instead of qualifier string.
Returns:
buf on success, NULL on failure.

Definition at line 148 of file paramtypes.c.

Referenced by param_code2str(), and select_param_vmark().

char* param_code2str ( char *  buf,
short  type,
boolean  descflag 
)

Convert a binary type code to string.

Parameters:
buf [out] buffer to store the resulting string (must have enough length)
type [in] binary type code to convert.
descflag [in] set to TRUE if you want result in description string instead of base and qualifier string.
Returns:
buf on success, NULL on failure.

Definition at line 177 of file paramtypes.c.

Referenced by new_param_check_and_adjust(), new_select_param_kind(), print_hmmdef_info(), and put_param_head().

HTK_Param* new_select_param_kind ( HTK_Param src,
short  dst_type_arg 
)

Extracts needed parameter vector specified in dst_type_arg from src, and returns newly allocated parameter structure.

Parameters:
src [in] input parameter
dst_type_arg [in] required parameter type
Returns:
newly allocated adjusted parameter, NULL on failure.

Definition at line 382 of file paramselect.c.

Referenced by new_param_check_and_adjust().

boolean select_param_vmark ( HTK_Param src,
short  dst_type_arg 
)

Compare source parameter type and required type in HTK HMM, and set mark.

Parameters:
src [in] input parameter
dst_type_arg [in] required parameter type
Returns:
TRUE on success, FALSE on failure.

Definition at line 227 of file paramselect.c.

Referenced by new_select_param_kind().

int exec_exclude_one_vector ( VECT vec,
int  len 
)

Execute deletion for one vector according to the exlusion marks.

This can be used to frame-synchronous parameter adjustment.

Parameters:
vec [I/O] target vector
len [in] length of above
Returns:
the new length.

Definition at line 168 of file paramselect.c.

int guess_basenum ( HTK_Param p,
short  qualtype 
)

Guess the length of the base coefficient according to the total vector length and parameter type.

Parameters:
p [in] parameter data
qualtype [in] parameter type
Returns:
the guessed size of the base coefficient.

Definition at line 195 of file paramselect.c.

Referenced by guess_abs_e_location(), and select_param_vmark().

boolean param_strip_zero ( HTK_Param param  ) 

Strip zero frames from MFCC data.

Parameters:
param [in] parameter data
Returns:
TRUE on success, FALSE on failure.

Definition at line 98 of file strip_mfcc.c.

Referenced by main_recognition_loop().

void put_param_head ( HTK_Param_Header h  ) 

Output parameter header.

Parameters:
h [in] pointer to a parameter header information

Definition at line 216 of file put_htkdata_info.c.

Referenced by put_param().

void put_vec ( VECT **  p,
int  num,
short  veclen 
)

Output array of vectors.

Parameters:
p [in] pointer to vector array represented as [0..num-1][0...veclen-1]
num [in] number of vectors in p
veclen [in] length of each vector

Definition at line 232 of file put_htkdata_info.c.

Referenced by put_param().

void put_param ( HTK_Param pinfo  ) 

Output the whole parameter information, including header and all vectors.

Parameters:
pinfo [in] pointer to parameter structure.

Definition at line 252 of file put_htkdata_info.c.

void put_param_info ( HTK_Param pinfo  ) 

Output the length of an input parameter by number of frames and seconds.

Parameters:
pinfo [in] pointer to parameter structure.

Definition at line 264 of file put_htkdata_info.c.

Referenced by ttyout_status_param().


Generated on Tue Dec 26 16:17:10 2006 for Julius by  doxygen 1.5.0