libsent/src/anlz/paramtypes.c File Reference

Convert between string and binary expression of parameter type. More...

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

Go to the source code of this file.

Functions

short param_qualstr2code (char *s)
 Convert a qualifier string to a binary type code.
short param_str2code (char *s)
 Convert a type string that contains basename and qualifiers to a binary type code.
char * param_qualcode2str (char *buf, short type, boolean descflag)
 Convert the qualifier part of a binary type code to string.
char * param_code2str (char *buf, short type, boolean descflag)
 Convert a binary type code to string.

Variables

static OptionStr pbase []
 Database that relates base type strings to binary code and description string.
static OptionStr pqual []
 Database that relates qualifier type strings to binary code and description string.


Detailed Description

Convert between string and binary expression of parameter type.

The functions in this file converts the expression of parameter type, between string (ex. "MFCC_E_D_Z") and internal binary format used in HTK.

Author:
Akinobu LEE
Date:
Tue Feb 15 00:06:26 2005
Revision
1.1.1.1

Definition in file paramtypes.c.


Function Documentation

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 70 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 106 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 149 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 178 of file paramtypes.c.

Referenced by param_check_and_adjust(), print_hmmdef_info(), put_param_head(), and select_param_kind().


Variable Documentation

OptionStr pbase[] [static]

Initial value:

 {
  {"WAVEFORM", F_WAVEFORM, "sampled waveform", FALSE},
  {"DISCRETE", F_DISCRETE, "Discrete", FALSE},
  {"LPC", F_LPC, "LPC", TRUE},
  {"LPCEPSTRA", F_LPCEPSTRA, "LPC cepstral", TRUE},
  {"MFCC", F_MFCC, "mel-frequency cepstral", TRUE},
  {"FBANK", F_FBANK, "log mel-filter bank", TRUE},
  {"MELSPEC", F_MELSPEC, "linear mel-filter bank", TRUE},
  {"LPREFC", F_LPREFC, "LPC(reflection)", TRUE},
  {"LPDELCEP", F_LPDELCEP, "LPC+Delta", TRUE},
  {"USER", F_USER, "user defined sample kind", TRUE},
  {NULL,0,NULL,FALSE}
}
Database that relates base type strings to binary code and description string.

Definition at line 36 of file paramtypes.c.

OptionStr pqual[] [static]

Initial value:

 {
  {"_E", F_ENERGY, "log energy coef.", TRUE},
  {"_N", F_ENERGY_SUP, "uppress absolute energy", TRUE},
  {"_D", F_DELTA, "delta coef.", TRUE},
  {"_A", F_ACCL, "acceleration coef.", TRUE},
  {"_C", F_COMPRESS, "compressed", TRUE},
  {"_Z", F_CEPNORM, "cepstral mean normalization", TRUE},
  {"_K", F_CHECKSUM, "CRC checksum added", TRUE},
  {"_0", F_ZEROTH, "0'th cepstral parameter", TRUE},
  {NULL,0,NULL,FALSE}
}
Database that relates qualifier type strings to binary code and description string.

Definition at line 50 of file paramtypes.c.


Generated on Tue Dec 18 16:01:38 2007 for Julius by  doxygen 1.5.4