Edinburgh Speech Tools
2.4-release
Loading...
Searching...
No Matches
EST_HMM.h
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
56
EST_FVector
mean;
57
EST_FVector
var;
58
float
gconst;
59
int
vecsize;
60
HMM_Mixture
&
operator =
(
const
HMM_Mixture
& a);
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
74
EST_TVector<HMM_Mixture>
mixture;
75
EST_FVector
m_weight;
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
90
EST_String
name;
91
92
void
clear();
93
94
EST_String
covkind;
95
EST_String
durkind;
96
EST_String
sampkind;
97
98
EST_TVector<HMM_State>
state;
99
EST_FMatrix
trans;
100
101
int
num_streams;
102
int
vecsize;
103
104
EST_read_status load(
EST_String
file
);
105
EST_read_status load_portion(
EST_TokenStream
&
ts
,
int
v_size
,
106
int
n_streams
);
107
EST_write_status save(
EST_String
file
);
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
121
typedef
EST_TList<HMM>
EST_HMMList
;
122
123
124
125
#endif
/* __EST_HMM_H__ */
EST_FMatrix
Definition
EST_FMatrix.h:56
EST_FVector
Definition
EST_FMatrix.h:114
EST_Hash_Pair
Definition
EST_THash.h:75
EST_String
Definition
EST_String.h:70
EST_TokenStream
Definition
EST_Token.h:235
HMM_Mixture
Definition
EST_HMM.h:47
HMM_State
Definition
EST_HMM.h:65
HMM
Definition
EST_HMM.h:82
include
EST_HMM.h
Generated on Tue Mar 12 2024 07:03:34 for Edinburgh Speech Tools by
1.9.8