kaldi-kws.h
Go to the documentation of this file.
1 // kws/kaldi-kws.h
2 
3 // Copyright 2012 Johns Hopkins University (Author: Guoguo Chen)
4 
5 // See ../../COPYING for clarification regarding multiple authors
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 // http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15 // WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
16 // MERCHANTABLITY OR NON-INFRINGEMENT.
17 // See the Apache 2 License for the specific language governing permissions and
18 // limitations under the License.
19 
20 
21 #ifndef KALDI_KWS_KALDI_KWS_H_
22 #define KALDI_KWS_KALDI_KWS_H_
23 
24 #include "fst/fstlib.h"
25 #include "lat/arctic-weight.h"
26 
27 namespace kaldi {
28 
29 using fst::TropicalWeight;
30 using fst::LogWeight;
31 using fst::ArcticWeight;
32 
33 // The T*T*T semiring
34 typedef fst::LexicographicWeight<TropicalWeight, TropicalWeight> StdLStdWeight;
35 typedef fst::LexicographicWeight<TropicalWeight, StdLStdWeight> StdLStdLStdWeight;
36 typedef fst::ArcTpl<StdLStdLStdWeight> StdLStdLStdArc;
37 
38 // The LxTxT' semiring
39 typedef fst::ProductWeight<TropicalWeight, ArcticWeight> StdXStdprimeWeight;
40 typedef fst::ProductWeight<LogWeight, StdXStdprimeWeight> LogXStdXStdprimeWeight;
41 typedef fst::ArcTpl<LogXStdXStdprimeWeight> LogXStdXStdprimeArc;
42 
43 // Rename the weight and arc types to make them look more "friendly".
44 typedef StdLStdLStdWeight KwsLexicographicWeight;
45 typedef StdLStdLStdArc KwsLexicographicArc;
46 typedef fst::VectorFst<KwsLexicographicArc> KwsLexicographicFst;
47 typedef LogXStdXStdprimeWeight KwsProductWeight;
48 typedef LogXStdXStdprimeArc KwsProductArc;
49 typedef fst::VectorFst<KwsProductArc> KwsProductFst;
50 
51 
52 } // namespace kaldi
53 #endif // KALDI_KWS_KALDI_KWS_H_
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
fst::VectorFst< KwsProductArc > KwsProductFst
Definition: kaldi-kws.h:49
LogXStdXStdprimeWeight KwsProductWeight
Definition: kaldi-kws.h:47
fst::LexicographicWeight< TropicalWeight, TropicalWeight > StdLStdWeight
Definition: kaldi-kws.h:34
ArcticWeightTpl< float > ArcticWeight
Definition: arctic-weight.h:84
StdLStdLStdArc KwsLexicographicArc
Definition: kaldi-kws.h:45
fst::VectorFst< KwsLexicographicArc > KwsLexicographicFst
Definition: kaldi-kws.h:46
fst::ProductWeight< TropicalWeight, ArcticWeight > StdXStdprimeWeight
Definition: kaldi-kws.h:39
fst::ArcTpl< StdLStdLStdWeight > StdLStdLStdArc
Definition: kaldi-kws.h:36
fst::ProductWeight< LogWeight, StdXStdprimeWeight > LogXStdXStdprimeWeight
Definition: kaldi-kws.h:40
fst::LexicographicWeight< TropicalWeight, StdLStdWeight > StdLStdLStdWeight
Definition: kaldi-kws.h:35
StdLStdLStdWeight KwsLexicographicWeight
Definition: kaldi-kws.h:44
LogXStdXStdprimeArc KwsProductArc
Definition: kaldi-kws.h:48
fst::ArcTpl< LogXStdXStdprimeWeight > LogXStdXStdprimeArc
Definition: kaldi-kws.h:41