Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

paramselect.c File Reference

Check and adjust parameter vector types. More...

#include <sent/stddefs.h>
#include <sent/htk_param.h>
#include <sent/htk_hmm.h>

Include dependency graph for paramselect.c:

Go to the source code of this file.

Functions

static void init_mark (HTK_Param *param)
static void free_mark ()
static void mark_exclude_vector (int loc, int len)
static void exec_exclude_vectors (HTK_Param *new, HTK_Param *src)
 Execute exclusion for a parameter data according to the exclusion marks.
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 select_param_vmark (HTK_Param *src, short dst_type_arg)
HTK_Paramnew_select_param_kind (HTK_Param *src, short dst_type_arg)
HTK_Paramnew_param_check_and_adjust (HTK_HMM_INFO *hmminfo, HTK_Param *param, boolean vflag)
 Top function to adjust parameter.

Variables

static int * vmark
 Exclusion marks of input vector.
static int vlen
 Length of above.
static int vnewlen
 Adjusted new length.
static short src_type
 Newly set source type.


Detailed Description

Check and adjust parameter vector types.

Author:
Akinobu LEE
Date:
Sun Feb 13 20:46:39 2005
This file is to check if HMM parameter and input parameter are the same. If they are not the same, it then tries to modify the input to match the required format in HMM. Available parameter modification is only to delete some part of the parameter (ex. MFCC_E_D_Z (26 dim.) can be modified to MFCC_E_D_N_Z (25 dim.) by just deleting the absolute power). Note that no parameter generation or conversion is implemented currently.

The adjustment algorithm is as follows:

  1. Initialize mark to 0 for each input vector element.
  2. Compare parameter type and mark unnecessary element as EXCLUDE(=1).
  3. Allocate a new parameter area and copy needed (=NOT marked) element.

Revision
1.1.1.1

Definition in file paramselect.c.


Function Documentation

static void init_mark HTK_Param param  )  [static]
 

Allocate new area for exclusion marks.

Parameters:
param [in] input parameter

Definition at line 65 of file paramselect.c.

Referenced by select_param_vmark().

static void free_mark  )  [static]
 

Free the exclusion marks.

Definition at line 80 of file paramselect.c.

Referenced by new_select_param_kind().

static void mark_exclude_vector int  loc,
int  len
[static]
 

Put exlusion marks for vector for len elements from loc -th dimension.

Parameters:
loc [in] beginning dimension to mark
len [in] number of dimension to mark from loc

Definition at line 92 of file paramselect.c.

Referenced by select_param_vmark().

static void exec_exclude_vectors HTK_Param new,
HTK_Param src
[static]
 

Execute exclusion for a parameter data according to the exclusion marks.

Execute vector element exclusion by copying vector from src to new according to the current exclusion marks. The parameter vector of new will be newly allocated here.

Parameters:
new [out] new adjusted parameter
src [in] source parameter

Definition at line 129 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 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().

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().

HTK_Param* new_param_check_and_adjust HTK_HMM_INFO hmminfo,
HTK_Param param,
boolean  vflag
 

Top function to adjust parameter.

It compares the types for the given parameter param and HMM definition hmminfo. If type is not the same, adjustment will be tried.

If adjustment is performed, the input param will be freed and the newly allocated adjusted parameter will be returned. Otherwise, the original param will be returned.

Parameters:
hmminfo [in] HTK HMM definition
param [i/o] input parameter, will be freed if adjustment was performed in this function
vflag [in] if TRUE, output verbose messages
Returns:
the original param if no adjustment needed, newly allocated param is adjustment was needed and successfully done, NULL on failure (in case parameter type does not match even by the adjustment).

Definition at line 429 of file paramselect.c.

Referenced by main_recognition_loop().


Generated on Tue Mar 28 16:02:55 2006 for Julius by  doxygen 1.4.2