1
/* ====================================================================
2
* Copyright (c) 1995-2000 Carnegie Mellon University. All rights
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
12
* 2. Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in
14
* the documentation and/or other materials provided with the
17
* This work was supported in part by funding from the Defense Advanced
18
* Research Projects Agency and the National Science Foundation of the
19
* United States of America, and the CMU Sphinx Speech Consortium.
21
* THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
22
* ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
25
* NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
* ====================================================================
36
/*********************************************************************
44
*********************************************************************/
57
#include <sphinxbase/prim_type.h>
58
#include <s3/vector.h>
59
#include <s3/acmod_set.h>
60
#include <s3/s3phseg_io.h>
65
/* MFCC directory/extension configuration
68
corpus_set_mfcc_dir(const char *root);
71
corpus_set_mfcc_ext(const char *ext);
73
/* seg file configuration functions */
75
corpus_set_seg_dir(const char *root);
78
corpus_set_seg_ext(const char *ext);
80
/* phone seg configuration functions */
82
corpus_set_phseg_dir(const char *dir);
85
corpus_set_phseg_ext(const char *ext);
87
/* sent file configuration functions */
89
corpus_set_sent_dir(const char *root);
92
corpus_set_sent_ext(const char *ext);
94
/* Vector quantized feature functions */
96
corpus_set_ccode_dir(const char *root);
99
corpus_set_ccode_ext(const char *ext);
102
corpus_set_dcode_dir(const char *root);
105
corpus_set_dcode_ext(const char *ext);
108
corpus_set_pcode_dir(const char *root);
111
corpus_set_pcode_ext(const char *ext);
114
corpus_set_ddcode_dir(const char *root);
117
corpus_set_ddcode_ext(const char *ext);
120
corpus_set_full_suffix_match(uint32 state);
122
/* Corpus LSN file configuration functions */
124
corpus_set_lsn_filename(const char *fn);
126
/* Per utterance MLLR transforms */
128
corpus_set_mllr_filename(const char *fn);
130
corpus_set_mllr_dir(const char *fn);
132
/* checkpoint the corpus module
133
(i.e. write out offset and remaining run length) */
135
corpus_ckpt(const char *fn);
139
corpus_set_ctl_host(char *host_port_spec);
141
/* Control file configuration functions */
143
corpus_set_ctl_filename(const char *filename);
146
corpus_set_interval(uint32 n_skip,
149
/* set the offset and run length from a checkpoint file */
151
corpus_ckpt_set_interval(const char *fn);
154
corpus_set_partition(uint32 r,
158
corpus_get_begin(void);
160
/* Initialization function to be called after
161
configuration functions */
166
/* After reaching the end of a (sub)corpus. This
167
* call sets things up as they were after corpus_init() */
171
/* data access/info functions */
173
corpus_next_utt(void);
175
corpus_utt_full_name(void);
177
corpus_utt_brief_name(void);
182
corpus_provides_sent(void);
184
corpus_get_sent(char **trans);
187
corpus_has_xfrm(void);
189
corpus_get_xfrm(float32 *****out_a,
192
uint32 *out_n_mllrcls,
193
uint32 *out_n_stream);
196
corpus_provides_mfcc(void);
198
corpus_get_mfcc(vector_t **mfc,
203
corpus_get_generic_featurevec(vector_t **mfc,
208
corpus_get_sildel(uint32 **sf,
213
corpus_provides_seg(void);
215
corpus_get_seg(uint16 **seg, int32 *n_frame);
217
int32 corpus_provides_phseg(void);
218
int corpus_get_phseg(acmod_set_t *acmod_set,
219
s3phseg_t **out_phseg);
222
corpus_load_lattice(s3lattice_t **out_lattice, const char *lat_dir, const char *lat_ext);
227
#endif /* CORPUS_H */