PocketSphinx
0.6
|
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 /* SphinxBase headers. */ 00114 #include <sphinxbase/err.h> 00115 #include <sphinxbase/ckd_alloc.h> 00116 #include <sphinxbase/cmd_ln.h> 00117 #include <sphinxbase/logmath.h> 00118 00119 /* Local headers. */ 00120 #include "ms_gauden.h" 00121 #include "bin_mdef.h" 00122 00131 #ifdef __cplusplus 00132 extern "C" { 00133 #endif 00134 #if 0 00135 } /* Fool Emacs into not indenting things. */ 00136 #endif 00137 00138 typedef uint8 senprob_t; 00147 typedef struct { 00148 senprob_t ***pdf; 00155 logmath_t *lmath; 00156 uint32 n_sen; 00157 uint32 n_feat; 00158 uint32 n_cw; 00159 uint32 n_gauden; 00160 float32 mixwfloor; 00161 uint32 *mgau; 00162 int32 *featscr; 00163 int32 aw; 00164 } senone_t; 00165 00166 00173 senone_t *senone_init (gauden_t *g, 00174 char const *mixwfile, 00175 char const *mgau_mapfile, 00178 float32 mixwfloor, 00179 logmath_t *lmath, 00180 bin_mdef_t *mdef 00181 ); 00182 00184 void senone_free(senone_t *s); 00190 int32 senone_eval (senone_t *s, int id, 00191 gauden_dist_t **dist, 00195 int n_top 00196 ); 00197 00198 #if 0 00199 { /* Stop indent from complaining */ 00200 #endif 00201 #ifdef __cplusplus 00202 } 00203 #endif 00204 00205 #endif