Edinburgh Speech Tools  2.1-release
EST_HMM.h
Go to the documentation of this file.
1 /*************************************************************************/
2 /* */
3 /* Centre for Speech Technology Research */
4 /* University of Edinburgh, UK */
5 /* Copyright (c) 1995,1996 */
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 /* THE UNIVERSITY OF EDINBURGH 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 THE UNIVERSITY OF EDINBURGH 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 : Paul Taylor */
34 /* Date : June 1996 */
35 /*-----------------------------------------------------------------------*/
36 /* HMM Class header file */
37 /* */
38 /*=======================================================================*/
39 
40 #ifndef __EST_HMM_H__
41 #define __EST_HMM_H__
42 
43 #include "EST_String.h"
44 #include "EST_FMatrix.h"
45 #include "EST_Token.h"
46 
47 class HMM_Mixture {
48 private:
49 public:
50  HMM_Mixture();
51  HMM_Mixture(const HMM_Mixture &s);
52  HMM_Mixture(int n);
53 
54  void init(int vsize);
55 
58  float gconst;
59  int vecsize;
61 };
62 
63 ostream& operator<<(ostream& s, const HMM_Mixture &mix);
64 
65 class HMM_State {
66 private:
67 public:
68  HMM_State();
69  HMM_State(const HMM_State &s);
70  HMM_State(int n);
71 
72  void init(int n_mixes, int vsize);
73 
76 
77  HMM_State& operator = (const HMM_State& a);
78 };
79 
80 ostream& operator<<(ostream& s, const HMM_State &st);
81 
82 class HMM {
83 private:
84 public:
85  HMM();
86  HMM(int n, int v);
87 
88  void init(int n_states, int vsize, int n_streams);
89 
91 
92  void clear();
93 
97 
100 
102  int vecsize;
103 
105  EST_read_status load_portion(EST_TokenStream &ts, int v_size,
106  int n_streams);
108  HMM& operator = (const HMM& a);
109 
110  void balls(void);
111 };
112 
113 
114 
115 ostream& operator<<(ostream& s, const HMM &model);
116 
117 int operator !=(const HMM_Mixture &a, const HMM_Mixture &b);
118 int operator !=(const HMM_State &a, const HMM_State &b);
119 
120 
122 
123 
124 
125 #endif /* __EST_HMM_H__ */
EST_String covkind
Definition: EST_HMM.h:94
EST_FVector m_weight
Definition: EST_HMM.h:75
int vecsize
Definition: EST_HMM.h:59
int operator!=(const HMM_Mixture &a, const HMM_Mixture &b)
EST_write_status
EST_TVector< HMM_State > state
Definition: EST_HMM.h:98
A vector class for floating point numbers. EST_FVector x should be used instead of float *x wherever ...
Definition: EST_FMatrix.h:119
HMM_Mixture & operator=(const HMM_Mixture &a)
bool save(Lattice &lattice, EST_String filename)
bool load(Lattice &lattice, EST_String filename)
int num_streams
Definition: EST_HMM.h:101
void init(int vsize)
EST_TList< HMM > EST_HMMList
Definition: EST_HMM.h:121
int vecsize
Definition: EST_HMM.h:102
EST_FVector mean
Definition: EST_HMM.h:56
EST_TVector< HMM_Mixture > mixture
Definition: EST_HMM.h:74
EST_String sampkind
Definition: EST_HMM.h:96
ostream & operator<<(ostream &s, const HMM_Mixture &mix)
EST_FMatrix trans
Definition: EST_HMM.h:99
EST_String durkind
Definition: EST_HMM.h:95
EST_String name
Definition: EST_HMM.h:90
EST_read_status
float gconst
Definition: EST_HMM.h:58
EST_FVector var
Definition: EST_HMM.h:57
Definition: EST_HMM.h:82