libsent/src/anlz/rdparam.c File Reference

Read HTK parameter file. More...

#include <sent/stddefs.h>
#include <sent/htk_param.h>
#include <sys/types.h>

Go to the source code of this file.

Functions

static boolean myread (char *buf, size_t unitbyte, int unitnum, FILE *fp)
 Read binary data from a file pointer, with byte swapping.
static boolean read_param (FILE *fp, HTK_Param *pinfo)
 Read in a HTK parameter file from fp .
boolean rdparam (char *filename, HTK_Param *pinfo)
 Top function to read a HTK parameter file.

Variables

static boolean needswap
 TRUE if need byte-swapping.


Detailed Description

Read HTK parameter file.

The byte order of HTK parameter file is assumed as big endian. If not, however, these functions try to read with forcing byte (re-)swapping.

When "_C" (compressed) or "_K" (CRC checksum added) exists in the file, they are processed in these functions. Then, after reading finished, these qualifiers are removed from its parameter type code.

Author:
Akinobu LEE
Date:
Tue Feb 15 00:16:44 2005
Revision
1.1.1.1

Definition in file rdparam.c.


Function Documentation

static boolean myread ( char *  buf,
size_t  unitbyte,
int  unitnum,
FILE *  fp 
) [static]

Read binary data from a file pointer, with byte swapping.

Parameters:
buf [out] buffer to store read data
unitbyte [in] size of a unit in bytes
unitnum [in] number of unit to read
fp [in] file pointer
Returns:
TRUE if specified number of unit was successfully read, FALSE if failed.

Definition at line 61 of file rdparam.c.

static boolean read_param ( FILE *  fp,
HTK_Param pinfo 
) [static]

Read in a HTK parameter file from fp .

Parameters:
fp [in] file pointer
pinfo [in] parameter data to store the read informations
Returns:
TRUE on success, FALSE on failure.

Definition at line 83 of file rdparam.c.

Referenced by rdparam().

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 192 of file rdparam.c.


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