1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>class SpeechHMM</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class <A HREF="#DOC.DOCU">SpeechHMM</A></H2></H2><BLOCKQUOTE>This class implements a special case of Hidden Markov Models that can be used to do connected word speech recognition for small vocabulary, using embedded training.</BLOCKQUOTE>
<HR>
<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=185>
<param name=classes value="CObject,MObject.html,CMachine,MMachine.html,CGradientMachine,MGradientMachine.html,CDistribution,MDistribution.html,CHMM,MHMM.html,CSpeechHMM,MSpeechHMM.html">
<param name=before value="M,M,M,M,M,M">
<param name=after value="Md_SPSPSPSP,Md_SPSPSP,Md_SPSP,Md_SP,Md_,M">
<param name=indent value="0,1,2,3,4,5">
<param name=arrowdir value="down">
</APPLET>
<HR>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.109.1">n_models</A></B>
<DD><I>the number of basic phoneme models </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="HMM.html">HMM</A>** <B><A HREF="#DOC.109.2">models</A></B>
<DD><I>the basic phoneme models</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>char** <B><A HREF="#DOC.109.3">model_names</A></B>
<DD><I>for each model, a unique name (used for translation)</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EMTrainer.html">EMTrainer</A>* <B><A HREF="#DOC.109.4">model_trainer</A></B>
<DD><I>if an initial alignment is given and an emtrainer for each model then it is used to train the models after kmeans during reset</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Dictionary.html">Dictionary</A>* <B><A HREF="#DOC.109.5">dict</A></B>
<DD><I>the acceptable dictionary, using the indices instead of the names </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Grammar.html">Grammar</A>* <B><A HREF="#DOC.109.6">grammar</A></B>
<DD><I>the acceptable grammar</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>real <B><A HREF="#DOC.109.7">word_entrance_penalty</A></B>
<DD><I>word entrance penalty: during viterbi, penalizes large sentences</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>bool** <B><A HREF="#DOC.109.8">word_transitions</A></B>
<DD><I>true if the given transition is a transition between words</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.109.9">max_n_states</A></B>
<DD><I>the maximum number of states in the graph (used for allocation)</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int* <B><A HREF="#DOC.109.10">states_to_model_states</A></B>
<DD><I>the relation between model states and SpeechHMM states</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int* <B><A HREF="#DOC.109.11">states_to_model</A></B>
<DD><I>the relation between models and SpeechHMM states</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int* <B><A HREF="#DOC.109.12">states_to_word</A></B>
<DD><I>the relation between words and SpeechHMM states</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int* <B><A HREF="#DOC.109.13">word_sequence</A></B>
<DD><I>the word sequence corresponding to the state sequence</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int* <B><A HREF="#DOC.109.14">target_word_sequence</A></B>
<DD><I>the target word sequence</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.109.15">target_word_sequence_size</A></B>
<DD><I>the length of the target word sequence</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.109.16">target_word_sequence_max_size</A></B>
<DD><I>the length of the longest target word sequence</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EditDistance.html">EditDistance</A>* <B><A HREF="#DOC.109.17">edit_distance</A></B>
<DD><I>this object is used to compute the decoding error </I>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.109.18">SpeechHMM</A></B>(int n_models_, <!1><A HREF="HMM.html">HMM</A>** models_, char** model_names_, <!1><A HREF="Dictionary.html">Dictionary</A>* dict_, <!1><A HREF="Grammar.html">Grammar</A>* grammar_, real word_entrance_penalty_ = LOG_ONE, <!1><A HREF="EMTrainer.html">EMTrainer</A>* model_trainer_ = NULL)
<DD><I>In order to create a SpeechHMM, we need to give a vector of <TT>n_models_</TT> <TT>HMM</TT>s as well as their corresponding name, a dictionary and a grammar, an optional word_entrance_penalty and an optional trainer that can be used to initialize each model independently</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.109.19">decode</A></B>(<!1><A HREF="List.html">List</A>* input)
<DD><I>this method returns the sentence associated to the input</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.109.20">prepareTrainModel</A></B>(<!1><A HREF="List.html">List</A>* input)
<DD><I>this method prepare the transition graph associated with a given training sentence</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.109.21">prepareTestModel</A></B>(<!1><A HREF="List.html">List</A>* input)
<DD><I>this method prepare the transition graph associated with a given test sentence</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual int <B><A HREF="#DOC.109.22">addWordToModel</A></B>(int word, int current_state)
<DD><I>this method is used by <TT>prepareTrainModel</TT> and <TT>prepareTestModel</TT> to prepare the model.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.109.23">addConnectionsBetweenWordsToModel</A></B>(int word, int next_word, int current_state, int next_current_state, real log_n_next)
<DD><I>this method is used by <TT>prepareTrainModel</TT> and <TT>prepareTestModel</TT> to prepare the model.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.109.24">realloc</A></B>(int <!1><A HREF="SeqExample.html#DOC.107.1">n_frames</A>, int n_states_)
<DD><I>this methods reallocate the structure to accomodate a new sequence</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual int <B><A HREF="#DOC.109.25">nStatesInGrammar</A></B>()
<DD><I>this methods returns the number of states in the grammar</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual int <B><A HREF="#DOC.109.26">nStatesInWord</A></B>(int word)
<DD><I>this methods returns the number of states in a given word</I>
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="HMM.html">HMM</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="SeqDataSet.html">SeqDataSet</A>* <B>data</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>n_states</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real <B>prior_transitions</B>
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Distribution.html">Distribution</A>** <B>states</B>
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Distribution.html">Distribution</A>** <B>unique_states</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>n_unique_states</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real** <B>transitions</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real** <B>log_transitions</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real** <B>dlog_transitions</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real** <B>transitions_acc</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real** <B>log_alpha</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real** <B>log_beta</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>int** <B>arg_viterbi</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>int* <B>viterbi_sequence</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real** <B>log_probabilities_s</B>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>printTransitions</B>(bool real_values=false, bool transitions_only=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>logAlpha</B>(<!1><A HREF="SeqExample.html">SeqExample</A>* ex)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>logBeta</B>(<!1><A HREF="SeqExample.html">SeqExample</A>* ex)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>logViterbi</B>(<!1><A HREF="SeqExample.html">SeqExample</A>* ex)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>logProbabilities</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>)
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="Distribution.html">Distribution</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>int <B>n_observations</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>tot_n_frames</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>max_n_frames</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real <B>log_probability</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real* <B>log_probabilities</B>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual real <B>logProbability</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual real <B>viterbiLogProbability</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual real <B>frameLogProbability</B>(real* <!1><A HREF="SeqExample.html#DOC.107.4">observations</A>, real* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>, int t)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>frameExpectation</B>(real* <!1><A HREF="SeqExample.html#DOC.107.4">observations</A>, real* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>, int t)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>eMIterInitialize</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>iterInitialize</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>eMSequenceInitialize</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>sequenceInitialize</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>eMAccPosteriors</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>, real log_posterior)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>frameEMAccPosteriors</B>(real* <!1><A HREF="SeqExample.html#DOC.107.4">observations</A>, real log_posterior, real* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>, int t)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>viterbiAccPosteriors</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>, real log_posterior)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>frameViterbiAccPosteriors</B>(real* <!1><A HREF="SeqExample.html#DOC.107.4">observations</A>, real log_posterior, real* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>, int t)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>eMUpdate</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>eMForward</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>viterbiForward</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>frameBackward</B>(real* <!1><A HREF="SeqExample.html#DOC.107.4">observations</A>, real* <!1><A HREF="QCMachine.html#DOC.40.5">alpha</A>, real* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>, int t)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>viterbiBackward</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>, real* <!1><A HREF="QCMachine.html#DOC.40.5">alpha</A>)
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="GradientMachine.html">GradientMachine</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>bool <B>is_free</B>
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="List.html">List</A>* <B>params</B>
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="List.html">List</A>* <B>der_params</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>n_params</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>real* <B>beta</B>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>init</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual int <B>numberOfParams</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>backward</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>, real* <!1><A HREF="QCMachine.html#DOC.40.5">alpha</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>allocateMemory</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>freeMemory</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>loadFILE</B>(FILE* <!1><A HREF="Measurer.html#DOC.30.2">file</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>saveFILE</B>(FILE* <!1><A HREF="Measurer.html#DOC.30.2">file</A>)
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="Machine.html">Machine</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>int <B>n_inputs</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>n_outputs</B>
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="List.html">List</A>* <B>outputs</B>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>forward</B>(<!1><A HREF="List.html">List</A>* <!1><A HREF="SeqExample.html#DOC.107.3">inputs</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>reset</B>()
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="Object.html">Object</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, int size, void* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addIOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, int* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, int init_value, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addROption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, real* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, real init_value, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addBOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, bool* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, bool init_value, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, void* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setIOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, int option)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setROption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, real option)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setBOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, bool option)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>load</B>(const char* filename)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>save</B>(const char* filename)
</DL></P>
</DL>
<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>This class implements a special case of Hidden Markov Models that
can be used to do connected word speech recognition for small
vocabulary, using embedded training.
<P>It contains a set of phoneme models (represented by HMMs), a dictionary
of words (which are sequences of phonemes) and a grammar (which states
the legal sentences of the langage).
<P>The decoding is done by creating the whole transition matrix
and hence is not adapted to large vocabulary problems.
<P></BLOCKQUOTE>
<DL>
<A NAME="n_models"></A>
<A NAME="DOC.109.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int n_models</B></TT>
<DD>the number of basic phoneme models
<DL><DT><DD></DL><P>
<A NAME="models"></A>
<A NAME="DOC.109.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="HMM.html">HMM</A>** models</B></TT>
<DD>the basic phoneme models
<DL><DT><DD></DL><P>
<A NAME="model_names"></A>
<A NAME="DOC.109.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>char** model_names</B></TT>
<DD>for each model, a unique name (used for translation)
<DL><DT><DD></DL><P>
<A NAME="model_trainer"></A>
<A NAME="DOC.109.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EMTrainer.html">EMTrainer</A>* model_trainer</B></TT>
<DD>if an initial alignment is given and an emtrainer for each model
then it is used to train the models after kmeans during reset
<DL><DT><DD></DL><P>
<A NAME="dict"></A>
<A NAME="DOC.109.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Dictionary.html">Dictionary</A>* dict</B></TT>
<DD>the acceptable dictionary, using the indices instead of the names
<DL><DT><DD></DL><P>
<A NAME="grammar"></A>
<A NAME="DOC.109.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Grammar.html">Grammar</A>* grammar</B></TT>
<DD>the acceptable grammar
<DL><DT><DD></DL><P>
<A NAME="word_entrance_penalty"></A>
<A NAME="DOC.109.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>real word_entrance_penalty</B></TT>
<DD>word entrance penalty: during viterbi, penalizes large sentences
<DL><DT><DD></DL><P>
<A NAME="word_transitions"></A>
<A NAME="DOC.109.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool** word_transitions</B></TT>
<DD>true if the given transition is a transition between words
<DL><DT><DD></DL><P>
<A NAME="max_n_states"></A>
<A NAME="DOC.109.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int max_n_states</B></TT>
<DD>the maximum number of states in the graph (used for allocation)
<DL><DT><DD></DL><P>
<A NAME="states_to_model_states"></A>
<A NAME="DOC.109.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int* states_to_model_states</B></TT>
<DD>the relation between model states and SpeechHMM states
<DL><DT><DD></DL><P>
<A NAME="states_to_model"></A>
<A NAME="DOC.109.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int* states_to_model</B></TT>
<DD>the relation between models and SpeechHMM states
<DL><DT><DD></DL><P>
<A NAME="states_to_word"></A>
<A NAME="DOC.109.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int* states_to_word</B></TT>
<DD>the relation between words and SpeechHMM states
<DL><DT><DD></DL><P>
<A NAME="word_sequence"></A>
<A NAME="DOC.109.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int* word_sequence</B></TT>
<DD>the word sequence corresponding to the state sequence
<DL><DT><DD></DL><P>
<A NAME="target_word_sequence"></A>
<A NAME="DOC.109.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int* target_word_sequence</B></TT>
<DD>the target word sequence
<DL><DT><DD></DL><P>
<A NAME="target_word_sequence_size"></A>
<A NAME="DOC.109.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int target_word_sequence_size</B></TT>
<DD>the length of the target word sequence
<DL><DT><DD></DL><P>
<A NAME="target_word_sequence_max_size"></A>
<A NAME="DOC.109.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int target_word_sequence_max_size</B></TT>
<DD>the length of the longest target word sequence
<DL><DT><DD></DL><P>
<A NAME="edit_distance"></A>
<A NAME="DOC.109.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EditDistance.html">EditDistance</A>* edit_distance</B></TT>
<DD>this object is used to compute the decoding error
<DL><DT><DD></DL><P>
<A NAME="SpeechHMM"></A>
<A NAME="DOC.109.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> SpeechHMM(int n_models_, <!1><A HREF="HMM.html">HMM</A>** models_, char** model_names_, <!1><A HREF="Dictionary.html">Dictionary</A>* dict_, <!1><A HREF="Grammar.html">Grammar</A>* grammar_, real word_entrance_penalty_ = LOG_ONE, <!1><A HREF="EMTrainer.html">EMTrainer</A>* model_trainer_ = NULL)</B></TT>
<DD>In order to create a SpeechHMM, we need to give a vector of <TT>n_models_</TT>
<TT>HMM</TT>s as well as their corresponding name, a dictionary and a grammar,
an optional word_entrance_penalty and an optional trainer that can be
used to initialize each model independently
<DL><DT><DD></DL><P>
<A NAME="decode"></A>
<A NAME="DOC.109.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void decode(<!1><A HREF="List.html">List</A>* input)</B></TT>
<DD>this method returns the sentence associated to the input
<DL><DT><DD></DL><P>
<A NAME="prepareTrainModel"></A>
<A NAME="DOC.109.20"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void prepareTrainModel(<!1><A HREF="List.html">List</A>* input)</B></TT>
<DD>this method prepare the transition graph associated with a
given training sentence
<DL><DT><DD></DL><P>
<A NAME="prepareTestModel"></A>
<A NAME="DOC.109.21"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void prepareTestModel(<!1><A HREF="List.html">List</A>* input)</B></TT>
<DD>this method prepare the transition graph associated with a
given test sentence
<DL><DT><DD></DL><P>
<A NAME="addWordToModel"></A>
<A NAME="DOC.109.22"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual int addWordToModel(int word, int current_state)</B></TT>
<DD>this method is used by <TT>prepareTrainModel</TT> and <TT>prepareTestModel</TT>
to prepare the model. It adds a given word to the current graph.
<DL><DT><DD></DL><P>
<A NAME="addConnectionsBetweenWordsToModel"></A>
<A NAME="DOC.109.23"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void addConnectionsBetweenWordsToModel(int word, int next_word, int current_state, int next_current_state, real log_n_next)</B></TT>
<DD>this method is used by <TT>prepareTrainModel</TT> and <TT>prepareTestModel</TT>
to prepare the model. It adds the connections between words.
<DL><DT><DD></DL><P>
<A NAME="realloc"></A>
<A NAME="DOC.109.24"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void realloc(int <!1><A HREF="SeqExample.html#DOC.107.1">n_frames</A>, int n_states_)</B></TT>
<DD>this methods reallocate the structure to accomodate a new sequence
<DL><DT><DD></DL><P>
<A NAME="nStatesInGrammar"></A>
<A NAME="DOC.109.25"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual int nStatesInGrammar()</B></TT>
<DD>this methods returns the number of states in the grammar
<DL><DT><DD></DL><P>
<A NAME="nStatesInWord"></A>
<A NAME="DOC.109.26"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual int nStatesInWord(int word)</B></TT>
<DD>this methods returns the number of states in a given word
<DL><DT><DD></DL><P></DL>
<HR><DL><DT><B>This class has no child classes.</B></DL>
<DL><DT><DT><B>Author:</B><DD>Samy Bengio (bengio@idiap.ch)
<DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>
|