00001 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */ 00002 /* ==================================================================== 00003 * Copyright (c) 1999-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 * senone.h -- Mixture density weights associated with each tied state. 00039 * 00040 * ********************************************** 00041 * CMU ARPA Speech Project 00042 * 00043 * Copyright (c) 1996 Carnegie Mellon University. 00044 * ALL RIGHTS RESERVED. 00045 * ********************************************** 00046 * 00047 * HISTORY 00048 * 00049 * $Log$ 00050 * Revision 1.1 2006/04/05 20:27:30 dhdfu 00051 * A Great Reorganzation of header files and executables 00052 * 00053 * Revision 1.7 2006/02/22 17:27:39 arthchan2003 00054 * Merged from SPHINX3_5_2_RCI_IRII_BRANCH: 1, NOT doing truncation in the multi-stream GMM computation \n. 2, Added .s3cont. to be the alias of the old multi-stream GMM computation routine \n. 3, Added license \n. 4, Fixed dox-doc. \n 00055 * 00056 * Revision 1.6.4.4 2006/01/16 19:47:05 arthchan2003 00057 * Removed the truncation of senone probability code. 00058 * 00059 * Revision 1.6.4.3 2005/08/03 18:53:43 dhdfu 00060 * Add memory deallocation functions. Also move all the initialization 00061 * of ms_mgau_model_t into ms_mgau_init (duh!), which entails removing it 00062 * from decode_anytopo and friends. 00063 * 00064 * Revision 1.6.4.2 2005/07/20 19:39:01 arthchan2003 00065 * Added licences in ms_* series of code. 00066 * 00067 * Revision 1.6.4.1 2005/07/05 05:47:59 arthchan2003 00068 * Fixed dox-doc. struct level of documentation are included. 00069 * 00070 * Revision 1.6 2005/06/21 19:00:19 arthchan2003 00071 * Add more detail comments to ms_senone.h 00072 * 00073 * Revision 1.5 2005/06/21 18:57:31 arthchan2003 00074 * 1, Fixed doxygen documentation. 2, Added $ keyword. 00075 * 00076 * Revision 1.2 2005/06/13 04:02:56 archan 00077 * Fixed most doxygen-style documentation under libs3decoder. 00078 * 00079 * Revision 1.1.1.1 2005/03/24 15:24:00 archan 00080 * I found Evandro's suggestion is quite right after yelling at him 2 days later. So I decide to check this in again without any binaries. (I have done make distcheck. ) . Again, this is a candidate for s3.6 and I believe I need to work out 4-5 intermediate steps before I can complete the first prototype. That's why I keep local copies. 00081 * 00082 * Revision 1.4 2004/12/06 10:52:01 arthchan2003 00083 * Enable doxygen documentation in libs3decoder 00084 * 00085 * Revision 1.3 2004/11/13 21:25:19 arthchan2003 00086 * commit of 1, absolute CI-GMMS , 2, fast CI senone computation using svq, 3, Decrease the number of static variables, 4, fixing the random generator problem of vector_vqgen, 5, move all unused files to NOTUSED 00087 * 00088 * Revision 1.2 2004/08/31 08:43:47 arthchan2003 00089 * Fixing _cpluscplus directive 00090 * 00091 * Revision 1.1 2004/08/09 00:17:11 arthchan2003 00092 * Incorporating s3.0 align, at this point, there are still some small problems in align but they don't hurt. For example, the score doesn't match with s3.0 and the output will have problem if files are piped to /dev/null/. I think we can go for it. 00093 * 00094 * Revision 1.1 2003/02/14 14:40:34 cbq 00095 * Compiles. Analysis is probably hosed. 00096 * 00097 * Revision 1.1 2000/04/24 09:39:41 lenzo 00098 * s3 import. 00099 * 00100 * 00101 * 13-Dec-95 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University. 00102 * Added senone_eval_all(). 00103 * 00104 * 12-Nov-95 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University. 00105 * Created. 00106 */ 00107 00108 00109 #ifndef _LIBFBS_SENONE_H_ 00110 #define _LIBFBS_SENONE_H_ 00111 00112 00113 #include "s3types.h" 00114 #include <logmath.h> 00115 #include "ms_gauden.h" 00116 00125 #ifdef __cplusplus 00126 extern "C" { 00127 #endif 00128 #if 0 00129 } /* Fool Emacs into not indenting things. */ 00130 #endif 00131 00132 typedef uint32 senprob_t; 00141 typedef struct { 00142 logmath_t *logmath; 00143 senprob_t ***pdf; 00150 int32 n_sen; 00151 int32 n_feat; 00152 int32 n_cw; 00153 int32 n_gauden; 00154 float32 mixwfloor; 00155 int32 shift; 00156 s3mgauid_t *mgau; 00157 int32* featscr; 00158 } senone_t; 00159 00160 00167 senone_t *senone_init (const char *mixwfile, 00168 const char *mgau_mapfile, 00171 float32 mixwfloor, 00172 logmath_t *logmath 00173 ); 00174 00176 void senone_free(senone_t *s); 00182 int32 senone_eval (senone_t *s, s3senid_t id, 00183 gauden_dist_t **dist, 00187 int32 n_top 00188 ); 00189 00194 void senone_eval_all (senone_t *s, 00195 gauden_dist_t **dist, 00196 int32 n_top, 00197 int32 *senscr 00199 ); 00200 00201 #if 0 00202 { /* Stop indent from complaining */ 00203 #endif 00204 #ifdef __cplusplus 00205 } 00206 #endif 00207 00208 #endif