00001 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */ 00002 /* ==================================================================== 00003 * Copyright (c) 1995-2004 Carnegie Mellon University. All rights 00004 * reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions 00008 * are met: 00009 * 00010 * 1. Redistributions of source code must retain the above copyright 00011 * notice, this list of conditions and the following disclaimer. 00012 * 00013 * 2. Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in 00015 * the documentation and/or other materials provided with the 00016 * distribution. 00017 * 00018 * This work was supported in part by funding from the Defense Advanced 00019 * Research Projects Agency and the National Science Foundation of the 00020 * United States of America, and the CMU Sphinx Speech Consortium. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 00023 * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00024 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00025 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 00026 * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00028 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00029 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00030 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 * ==================================================================== 00035 * 00036 */ 00037 00038 /* 00039 * whmm.h -- hmm structure that is used by sphinx 3.0 decode_anytopo (and perhaps 00040 * the fsg search as well) 00041 * 00042 * ********************************************** 00043 * CMU ARPA Speech Project 00044 * 00045 * Copyright (c) 1995 Carnegie Mellon University. 00046 * ALL RIGHTS RESERVED. 00047 * ********************************************** 00048 * 14-Jul-05 ARCHAN (archan@cs.cmu.edu) at Carnegie Mellon Unversity 00049 * First created it. 00050 * 00051 * $Log$ 00052 * Revision 1.1 2006/04/05 20:27:30 dhdfu 00053 * A Great Reorganzation of header files and executables 00054 * 00055 * Revision 1.2 2006/02/23 05:07:53 arthchan2003 00056 * Merged from branch SPHINX3_5_2_RCI_IRII_BRANCH: split whmm's routine. 00057 * 00058 * Revision 1.1.2.4 2005/09/07 23:40:06 arthchan2003 00059 * Several Bug Fixes and Enhancements to the flat-lexicon 00060 * 1, Fixed Dox-doc. 00061 * 2, Add -worddumpef and -hmmdumpef in parrallel to -worddumpsf and 00062 * -hmmdumpsf. Usage is trivial. a structure called fwd_dbg_t now wrapped 00063 * up all these loose parameters. Methods of fwd_dbg are implemented. 00064 * 3, word_ugprob is now initialized by init_word_ugprob 00065 * 4, Full-triphone expansion is implemented. User can change this 00066 * behavior by specifying -multiplex_multi and -multiplex_single. The 00067 * former turn on multiplex triphone for word-begin for multi-phone word. 00068 * The latter do that for single-phone word. Turning off both could 00069 * tremendously increase computation. 00070 * 5, Word expansions of possible right contexts now records independent 00071 * history. The behavior in the past was to use only one history for a 00072 * word. 00073 * 00074 * Revision 1.1.2.3 2005/07/24 01:42:58 arthchan2003 00075 * Added whmm_alloc_light, that will by-pass and not use any internal list inside whmm.c 00076 * 00077 * Revision 1.1.2.2 2005/07/17 05:57:25 arthchan2003 00078 * 1, Removed wid from the argument list of eval_*_whmm, 2, Allow allocation of whmm_alloc to be more flexible. 00079 * 00080 * Revision 1.1.2.1 2005/07/15 07:48:32 arthchan2003 00081 * split the hmm (whmm_t) and context building process (ctxt_table_t) from the the flat_fwd.c 00082 * 00083 * 00084 */ 00085 00086 #ifndef _S3_WHMM_H_ 00087 #define _S3_WHMM_H_ 00088 00089 00090 #include "prim_type.h" 00091 #include "s3types.h" 00092 #include "tmat.h" 00093 #include "dict.h" 00094 #include "mdef.h" 00095 #include "hmm.h" 00096 00097 00098 #ifdef __cplusplus 00099 extern "C" { 00100 #endif 00101 #if 0 00102 /* Fool Emacs. */ 00103 } 00104 #endif 00105 00123 typedef struct whmm_s { 00124 hmm_t hmm; 00126 int16 pos; 00127 s3cipid_t rc; 00129 s3cipid_t lc; 00131 struct whmm_s *next; 00132 } whmm_t; 00133 00134 00136 void whmm_free (whmm_t *h 00137 ); 00138 00140 whmm_t *whmm_alloc(hmm_context_t *ctx, int32 pos, int mpx, 00141 s3ssid_t ssid, s3tmatid_t tmatid); 00142 00143 00146 void dump_whmm (s3wid_t w, 00147 whmm_t *h, 00148 int32 *senscr, 00149 tmat_t *tmat, 00150 int32 n_frame, 00151 dict_t *dict, 00152 mdef_t *mdef 00153 ); 00154 00155 #ifdef __cplusplus 00156 } 00157 #endif 00158 00159 00160 #endif /* _S3_WHMM_H_ */