mllr.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* ====================================================================
3  * Copyright (c) 1995-2004 Carnegie Mellon University. All rights
4  * reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  *
18  * This work was supported in part by funding from the Defense Advanced
19  * Research Projects Agency and the National Science Foundation of the
20  * United States of America, and the CMU Sphinx Speech Consortium.
21  *
22  * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
23  * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
26  * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  *
34  * ====================================================================
35  *
36  */
37 /*
38  * mllr.h -- Application of MLLR regression matrices to codebook means
39  *
40  * **********************************************
41  * CMU ARPA Speech Project
42  *
43  * Copyright (c) 1996 Carnegie Mellon University.
44  * ALL RIGHTS RESERVED.
45  * **********************************************
46  *
47  * HISTORY
48  * $Log$
49  * Revision 1.1 2006/04/05 20:27:30 dhdfu
50  * A Great Reorganzation of header files and executables
51  *
52  * Revision 1.6 2005/06/21 18:50:45 arthchan2003
53  * Log. 1, Fixed doxygen documentation, 2, Added $Log$
54  * Revision 1.1 2006/04/05 20:27:30 dhdfu
55  * A Great Reorganzation of header files and executables
56  * keyword.
57  *
58  * Revision 1.5 2005/06/19 19:41:22 archan
59  * Sphinx3 to s3.generic: Added multiple regression class for single stream MLLR. Enabled MLLR for livepretend and decode.
60  *
61  * Revision 1.4 2005/06/13 04:02:55 archan
62  * Fixed most doxygen-style documentation under libs3decoder.
63  *
64  * Revision 1.3 2005/03/30 01:22:47 archan
65  * Fixed mistakes in last updates. Add
66  *
67  *
68  * 24-Jul-04 ARCHAN (archan@cs.cmu.edu) at Carnegie Mellon University
69  * First checked in from sphinx 3.0 to sphinx 3.5
70  *
71  * 26-Sep-96 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
72  * Started.
73  */
74 
75 
76 #ifndef _MLLR_H_
77 #define _MLLR_H_
78 
79 
83 #ifdef __cplusplus
84 extern "C" {
85 #endif
86 #if 0
87 } /* Fool Emacs into not indenting things. */
88 #endif
89 
90 #include <s3types.h>
91 #include "cont_mgau.h"
92 
93 
95 void mllr_dump(float32 ***A,
96  float32 **B,
97  int32 veclen,
98  int32 nclass
99  );
100 /*
101  * Load a regression matrix from the given file. Space for the matrix is allocated
102  * by this routine. (The regression "matrix" is actually a matrix A and a vector B.)
103  * @return 0 if successful, -1 otherwise.
104  */
105 int32 mllr_read_regmat (const char *regmatfile,
106  float32 ****A,
107  float32 ***B,
108  int32 *nclass,
109  int32 ceplen);
115 int32 mllr_free_regmat (float32 ***A,
116  float32 **B
117  );
118 
119 
125 int32 mllr_norm_mgau (mgau_model_t *mgauset,
126  float32 ***A,
127  float32 **B,
128  int32 nclass,
129  int32 *cb2mllr
130  );
131 
132 #if 0
133 { /* Stop indent from complaining */
134 #endif
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 #endif
int32 mllr_read_regmat(const char *regmatfile, float32 ****A, float32 ***B, int32 *nclass, int32 ceplen)
Interface of full GMM computation with integer value of log likelihood.
int32 mllr_norm_mgau(mgau_model_t *mgauset, float32 ***A, float32 **B, int32 nclass, int32 *cb2mllr)
Size definition of semantically units. Common for both s3 and s3.X decoder.
void mllr_dump(float32 ***A, float32 **B, int32 veclen, int32 nclass)
The set of mixture-Gaussians in an acoustic model used in Sphinx 3.X family of tool.
Definition: cont_mgau.h:207
int32 mllr_free_regmat(float32 ***A, float32 **B)