tmat.h
Go to the documentation of this file.
/* ====================================================================
* Copyright (c) 1999-2004 Carnegie Mellon University. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* This work was supported in part by funding from the Defense Advanced
* Research Projects Agency and the National Science Foundation of the
* United States of America, and the CMU Sphinx Speech Consortium.
*
* THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
* ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
* NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ====================================================================
*
*/
#ifndef _S3_TMAT_H_
#define _S3_TMAT_H_
#include <stdio.h>
#include <sphinxbase/logmath.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
uint8 ***tp;
int16 n_tmat;
int16 n_state;
} tmat_t;
tmat_t *tmat_init (char const *tmatfile,
logmath_t *lmath,
float64 tpfloor,
int32 breport
);
void tmat_dump (tmat_t *tmat,
FILE *fp
);
void tmat_free (tmat_t *t
);
void tmat_report(tmat_t *t
);
#ifdef __cplusplus
}
#endif
#endif
tmat_t
Transition matrix data structure.
Definition: tmat.h:55
tmat_t::n_state
int16 n_state
Number source states in matrix (only the emitting states); Number destination states = n_state+1,...
Definition: tmat.h:59
tmat_t::tp
uint8 *** tp
The transition matrices; kept in the same scale as acoustic scores; tp[tmatid][from-state][to-state].
Definition: tmat.h:56
tmat_t::n_tmat
int16 n_tmat
Number matrices.
Definition: tmat.h:58
tmat_init
tmat_t * tmat_init(char const *tmatfile, logmath_t *lmath, float64 tpfloor, int32 breport)
Initialize transition matrix.
Definition: tmat.c:134
tmat_report
void tmat_report(tmat_t *t)
Report the detail of the transition matrix structure.
Definition: tmat.c:262
tmat_free
void tmat_free(tmat_t *t)
RAH, add code to remove memory allocated by tmat_init.
Definition: tmat.c:275
tmat_dump
void tmat_dump(tmat_t *tmat, FILE *fp)
Dumping the transition matrix for debugging.
Definition: tmat.c:72