PocketSphinx  0.6
ms_gauden.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* ====================================================================
3  * Copyright (c) 1999-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 #ifndef _LIBFBS_GAUDEN_H_
39 #define _LIBFBS_GAUDEN_H_
40 
53 /* SphinxBase headers. */
54 #include <sphinxbase/feat.h>
55 #include <sphinxbase/logmath.h>
56 #include <sphinxbase/cmd_ln.h>
57 
58 /* Local headers. */
59 #include "vector.h"
60 #include "pocketsphinx_internal.h"
61 #include "hmm.h"
62 
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 #if 0
67 } /* Fool Emacs into not indenting things. */
68 #endif
69 
74 typedef struct {
75  int32 id;
76  mfcc_t dist;
80 
85 typedef struct {
86  mfcc_t ****mean;
87  mfcc_t ****var;
88  mfcc_t ***det;
90  logmath_t *lmath;
91  int32 n_mgau;
92  int32 n_feat;
93  int32 n_density;
94  int32 *featlen;
95 } gauden_t;
96 
97 
104 gauden_t *
105 gauden_init (char const *meanfile,
106  char const *varfile,
107  float32 varfloor,
108  logmath_t *lmath
109  );
110 
112 void gauden_free(gauden_t *g);
115 int32 gauden_mllr_transform(gauden_t *s, ps_mllr_t *mllr, cmd_ln_t *config);
116 
123 int32
124 gauden_dist (gauden_t *g,
125  int mgau,
127  int n_top,
128  mfcc_t **obs,
129  gauden_dist_t **out_dist
134  );
135 
139 void gauden_dump (const gauden_t *g
140  );
141 
145 void gauden_dump_ind (const gauden_t *g,
146  int senidx
147  );
148 
149 #if 0
150 { /* Stop indent from complaining */
151 #endif
152 #ifdef __cplusplus
153 }
154 #endif
155 
156 #endif /* GAUDEN_H */