Debian Codegraph @

src/cg/cst_cg_map.h

raw
1 /*************************************************************************/
2 /* */
3 /* Language Technologies Institute */
4 /* Carnegie Mellon University */
5 /* Copyright (c) 2010 */
6 /* All Rights Reserved. */
7 /* */
8 /* Permission is hereby granted, free of charge, to use and distribute */
9 /* this software and its documentation without restriction, including */
10 /* without limitation the rights to use, copy, modify, merge, publish, */
11 /* distribute, sublicense, and/or sell copies of this work, and to */
12 /* permit persons to whom this work is furnished to do so, subject to */
13 /* the following conditions: */
14 /* 1. The code must retain the above copyright notice, this list of */
15 /* conditions and the following disclaimer. */
16 /* 2. Any modifications must be clearly marked as such. */
17 /* 3. Original authors' names are not deleted. */
18 /* 4. The authors' names are not used to endorse or promote products */
19 /* derived from this software without specific prior written */
20 /* permission. */
21 /* */
22 /* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
23 /* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
24 /* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
25 /* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
26 /* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
27 /* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
28 /* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
29 /* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
30 /* THIS SOFTWARE. */
31 /* */
32 /*************************************************************************/
33 /* Author: Alok Parlikar ([email protected]) */
34 /* Date: April 2010 */
35 /*************************************************************************/
36 /* */
37 /* A clustergen generic voice, that can load from a file */
38 /* */
39 /*************************************************************************/
40 #ifndef __CST_CG_MAP_H
41 #define __CST_CG_MAP_H
42
43 #include "cst_file.h"
44 #include "cst_cg.h"
45 #include "cst_cart.h"
46 #include "cst_val.h"
47 #include "cst_synth.h"
48
49 /* If voice to be read was dumped on a platform byteswapped from this one */
50 #define CST_CG_BYTESWAPPED_VOICE 27
51
52 int cst_cg_read_header(cst_file fd);
53
54 cst_cg_db *cst_cg_load_db(cst_voice *vox,cst_file fd, int bs);
55 void cst_cg_free_db(cst_file fd,cst_cg_db*);
56
57 char *cst_read_string(cst_file fd, int bs);
58 void* cst_read_padded(cst_file fd, int*nb, int bs);
59 char** cst_read_db_types(cst_file fd, int bs);
60
61 cst_cart_node* cst_read_tree_nodes(cst_file fd, int bs);
62 char** cst_read_tree_feats(cst_file fd, int bs);
63 cst_cart* cst_read_tree(cst_file fd, int bs);
64 cst_cart** cst_read_tree_array(cst_file fd, int bs);
65
66 float* cst_read_float_array(cst_file fd, int bs);
67 double* cst_read_double_array(cst_file fd, int bs);
68 unsigned short* cst_read_ushort_array(cst_file fd, int bs);
69 float** cst_read_2d_float_array(cst_file fd, int bs);
70 double** cst_read_2d_double_array(cst_file fd, int bs);
71 unsigned short** cst_read_2d_ushort_array(cst_file fd, int bs);
72
73 dur_stat** cst_read_dur_stats(cst_file fd, int bs);
74
75 char*** cst_read_phone_states(cst_file fd, int bs);
76
77 void cst_read_voice_feature(cst_file fd,char** fname, char** fval, int bs);
78 int cst_read_int(cst_file fd, int bs);
79 float cst_read_float(cst_file fd, int bs);
80
81 extern const char * const cg_voice_header_string;
82
83 #endif