interp.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  * interp.h -- CD-senone and CI-senone score interpolation
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 2006/02/22 16:48:30 arthchan2003
53  * Merged from SPHINX3_5_2_RCI_IRII_BRANCH: 1, Fixed issues in , 2, Fixed issues of dox-doc
54  *
55  * Revision 1.5.4.1 2005/07/05 05:47:59 arthchan2003
56  * Fixed dox-doc. struct level of documentation are included.
57  *
58  * Revision 1.5 2005/06/21 18:39:04 arthchan2003
59  * Log. 1, Fixed doxygen documentation, 2, Added $Log$
60  * Revision 1.1 2006/04/05 20:27:30 dhdfu
61  * A Great Reorganzation of header files and executables
62  *
63  * Log. 1, Fixed doxygen documentation, 2, Added Revision 1.6 2006/02/22 16:48:30 arthchan2003
64  * Log. 1, Fixed doxygen documentation, 2, Added Merged from SPHINX3_5_2_RCI_IRII_BRANCH: 1, Fixed issues in , 2, Fixed issues of dox-doc
65  * Log. 1, Fixed doxygen documentation, 2, Added
66  *
67  * Revision 1.4 2005/06/13 04:02:55 archan
68  * Fixed most doxygen-style documentation under libs3decoder.
69  *
70  * Revision 1.3 2005/03/30 01:22:47 archan
71  * Fixed mistakes in last updates. Add
72  *
73  *
74  * 05-Jun-96 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
75  * Created.
76  */
77 
78 
79 #ifndef _LIBFBS_INTERP_H_
80 #define _LIBFBS_INTERP_H_
81 
82 
83 #include <s3types.h>
84 #include <logmath.h>
85 
91 #ifdef __cplusplus
92 extern "C" {
93 #endif
94 #if 0
95 } /* Fool Emacs into not indenting things. */
96 #endif
97 
102 typedef struct {
103  logmath_t *logmath;
104  int32 n_sen;
111  struct interp_wt_s {
112  int32 cd;
113  int32 ci;
114  } *wt;
115 } interp_t;
116 
117 
124 interp_t *interp_init (const char *interpfile, /* In: interpolation weights file */
125  logmath_t *logmath
126  );
127 
132 int32 interp_cd_ci (interp_t *ip,
133  int32 *senscr,
134  int32 cd,
135  int32 ci
136  );
137 
142 int32 interp_all (interp_t *ip,
143  int32 *senscr,
145  s3senid_t *cimap,
146  int32 n_ci_sen
147  );
148 
149 #if 0
150 { /* Stop indent from complaining */
151 #endif
152 #ifdef __cplusplus
153 }
154 #endif
155 
156 #endif