onlinebin-util.h
Go to the documentation of this file.
1 // online/onlinebin-util.h
2 
3 // Copyright 2012 Cisco Systems (author: Matthias Paulik)
4 
5 // Modifications to the original contribution by Cisco Systems made by:
6 // Vassil Panayotov
7 
8 // See ../../COPYING for clarification regarding multiple authors
9 //
10 // Licensed under the Apache License, Version 2.0 (the "License");
11 // you may not use this file except in compliance with the License.
12 // You may obtain a copy of the License at
13 //
14 // http://www.apache.org/licenses/LICENSE-2.0
15 //
16 // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 // KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
18 // WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
19 // MERCHANTABLITY OR NON-INFRINGEMENT.
20 // See the Apache 2 License for the specific language governing permissions and
21 // limitations under the License.
22 
23 #ifndef KALDI_ONLINE_ONLINEBIN_UTIL_H_
24 #define KALDI_ONLINE_ONLINEBIN_UTIL_H_
25 
26 #include "base/kaldi-common.h"
27 #include "fstext/fstext-lib.h"
28 
29 // This file hosts the declarations of various auxiliary functions, used by
30 // the binaries in "onlinebin" directory. These functions are not part of the
31 // core online decoding infrastructure, but rather artifacts of the particular
32 // implementation of the binaries.
33 
34 namespace kaldi {
35 
36 // Reads a decoding graph from a file
37 fst::Fst<fst::StdArc> *ReadDecodeGraph(const std::string& filename);
38 
39 // Prints a string corresponding to (a possibly partial) decode result as
40 // and adds a "new line" character if "line_break" argument is true
41 void PrintPartialResult(const std::vector<int32>& words,
42  const fst::SymbolTable *word_syms,
43  bool line_break);
44 
45 } // namespace kaldi
46 
47 #endif // KALDI_ONLINE_ONLINEBIN_UTIL_H_
int32 words[kMaxOrder]
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
void PrintPartialResult(const std::vector< int32 > &words, const fst::SymbolTable *word_syms, bool line_break)
fst::Fst< fst::StdArc > * ReadDecodeGraph(const std::string &filename)