From 444310f15834f40bab24a073e6816707a1161890 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Thu, 23 Feb 2023 21:23:57 +0300 Subject: [PATCH 1/4] Support openfst-1.7.6 --- src/chain/chain-supervision.cc | 10 ++++------ src/fstext/determinize-star-inl.h | 2 +- src/fstext/fstext-utils-inl.h | 12 ++++++------ src/fstext/kaldi-fst-io-inl.h | 2 +- src/fstext/pre-determinize-inl.h | 4 ++-- src/kws/kws-functions.cc | 2 +- src/lat/kaldi-lattice.cc | 4 ++-- 7 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/chain/chain-supervision.cc b/src/chain/chain-supervision.cc index f8a2c1d11cc..b29000a448c 100644 --- a/src/chain/chain-supervision.cc +++ b/src/chain/chain-supervision.cc @@ -571,9 +571,8 @@ void Supervision::Write(std::ostream &os, bool binary) const { // Write using StdAcceptorCompactFst, making use of the fact that it's an // acceptor. fst::FstWriteOptions write_options(""); - fst::StdCompactAcceptorFst::WriteFst( - fst, fst::AcceptorCompactor(), os, - write_options); + fst::StdCompactAcceptorFst cfst(fst); + cfst.Write(os, write_options); } } else { KALDI_ASSERT(e2e_fsts.size() == num_sequences); @@ -586,9 +585,8 @@ void Supervision::Write(std::ostream &os, bool binary) const { // Write using StdAcceptorCompactFst, making use of the fact that it's an // acceptor. fst::FstWriteOptions write_options(""); - fst::StdCompactAcceptorFst::WriteFst( - e2e_fsts[i], fst::AcceptorCompactor(), os, - write_options); + fst::StdCompactAcceptorFst cfst(e2e_fsts[i]); + cfst.Write(os, write_options); } } WriteToken(os, binary, ""); diff --git a/src/fstext/determinize-star-inl.h b/src/fstext/determinize-star-inl.h index e9650ca29a6..36c9ba397a6 100644 --- a/src/fstext/determinize-star-inl.h +++ b/src/fstext/determinize-star-inl.h @@ -725,7 +725,7 @@ void DeterminizerStar::EpsilonClosure:: { // this sorting is based on StateId - sort(ecinfo_.begin(), ecinfo_.end()); + std::sort(ecinfo_.begin(), ecinfo_.end()); output_subset->clear(); diff --git a/src/fstext/fstext-utils-inl.h b/src/fstext/fstext-utils-inl.h index 853697387b9..d877c03e1ae 100644 --- a/src/fstext/fstext-utils-inl.h +++ b/src/fstext/fstext-utils-inl.h @@ -374,12 +374,12 @@ void GetSymbols(const SymbolTable &symtab, std::vector *syms_out) { KALDI_ASSERT(syms_out != NULL); syms_out->clear(); - for (SymbolTableIterator iter(symtab); - !iter.Done(); - iter.Next()) { - if (include_eps || iter.Value() != 0) { - syms_out->push_back(iter.Value()); - KALDI_ASSERT(syms_out->back() == iter.Value()); // an integer-range thing. + for (SymbolTable::iterator iter = symtab.begin(); + iter != symtab.end(); + ++iter) { + if (include_eps || iter->Label() != 0) { + syms_out->push_back(iter->Label()); + KALDI_ASSERT(syms_out->back() == iter->Label()); // an integer-range thing. } } } diff --git a/src/fstext/kaldi-fst-io-inl.h b/src/fstext/kaldi-fst-io-inl.h index b6bae4b9dc9..f7bb3a7c2b5 100644 --- a/src/fstext/kaldi-fst-io-inl.h +++ b/src/fstext/kaldi-fst-io-inl.h @@ -44,7 +44,7 @@ void WriteFstKaldi(std::ostream &os, bool binary, bool acceptor = false, write_one = false; FstPrinter printer(t, t.InputSymbols(), t.OutputSymbols(), NULL, acceptor, write_one, "\t"); - printer.Print(&os, ""); + printer.Print(os, ""); if (os.fail()) KALDI_ERR << "Stream failure detected writing FST to stream"; // Write another newline as a terminating character. The read routine will diff --git a/src/fstext/pre-determinize-inl.h b/src/fstext/pre-determinize-inl.h index b67b0ba6fa6..b531bdef21a 100644 --- a/src/fstext/pre-determinize-inl.h +++ b/src/fstext/pre-determinize-inl.h @@ -235,8 +235,8 @@ inline bool HasBannedPrefixPlusDigits(SymbolTable *symTable, std::string prefix, assert(symTable != NULL); const char *prefix_ptr = prefix.c_str(); size_t prefix_len = strlen(prefix_ptr); // allowed to be zero but not encouraged. - for (SymbolTableIterator siter(*symTable); !siter.Done(); siter.Next()) { - const std::string &sym = siter.Symbol(); + for (SymbolTable::iterator siter = symTable->begin(); siter != symTable->end(); ++siter) { + const std::string &sym = siter->Symbol(); if (!strncmp(prefix_ptr, sym.c_str(), prefix_len)) { // has prefix. if (isdigit(sym[prefix_len])) { // we don't allow prefix followed by a digit, as a symbol. // Has at least one digit. diff --git a/src/kws/kws-functions.cc b/src/kws/kws-functions.cc index d1d71ce7a42..3e27226f13c 100644 --- a/src/kws/kws-functions.cc +++ b/src/kws/kws-functions.cc @@ -75,7 +75,7 @@ bool ClusterLattice(CompactLattice *clat, unordered_map >::iterator iter; for (iter = head.begin(); iter != head.end(); ++iter) { // For this ilabel, sort all the arcs on time, from first to last. - sort(iter->second.begin(), iter->second.end(), CompareInterval); + std::sort(iter->second.begin(), iter->second.end(), CompareInterval); std::vector tmp; tmp.push_back(iter->second[0]); for (int32 i = 1; i < iter->second.size(); i++) { diff --git a/src/lat/kaldi-lattice.cc b/src/lat/kaldi-lattice.cc index 744cc538462..648e67115b7 100644 --- a/src/lat/kaldi-lattice.cc +++ b/src/lat/kaldi-lattice.cc @@ -78,7 +78,7 @@ bool WriteCompactLattice(std::ostream &os, bool binary, fst::FstPrinter printer(t, t.InputSymbols(), t.OutputSymbols(), NULL, acceptor, write_one, "\t"); - printer.Print(&os, ""); + printer.Print(os, ""); if (os.fail()) KALDI_WARN << "Stream failure detected."; // Write another newline as a terminating character. The read routine will @@ -403,7 +403,7 @@ bool WriteLattice(std::ostream &os, bool binary, const Lattice &t) { fst::FstPrinter printer(t, t.InputSymbols(), t.OutputSymbols(), NULL, acceptor, write_one, "\t"); - printer.Print(&os, ""); + printer.Print(os, ""); if (os.fail()) KALDI_WARN << "Stream failure detected."; // Write another newline as a terminating character. The read routine will From f9ed1f1b515efd467c03052b297db3011a3fbf77 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Thu, 23 Feb 2023 21:24:12 +0300 Subject: [PATCH 2/4] Support openfst-1.8.0 --- src/fstext/fstext-utils-inl.h | 2 +- src/fstext/fstext-utils.h | 2 +- src/fstext/lattice-utils-inl.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fstext/fstext-utils-inl.h b/src/fstext/fstext-utils-inl.h index d877c03e1ae..44e641a3f20 100644 --- a/src/fstext/fstext-utils-inl.h +++ b/src/fstext/fstext-utils-inl.h @@ -163,7 +163,7 @@ void RemoveSomeInputSymbols(const std::vector &to_remove, MutableFst *fst) { KALDI_ASSERT_IS_INTEGER_TYPE(I); RemoveSomeInputSymbolsMapper mapper(to_remove); - Map(fst, mapper); + ArcMap(fst, mapper); } template diff --git a/src/fstext/fstext-utils.h b/src/fstext/fstext-utils.h index 5789dbe7cc3..db14ddd3576 100644 --- a/src/fstext/fstext-utils.h +++ b/src/fstext/fstext-utils.h @@ -113,7 +113,7 @@ void PushInLog(VectorFst *fst, uint32 ptype, float delta = kDelta) { template void MinimizeEncoded(VectorFst *fst, float delta = kDelta) { - Map(fst, QuantizeMapper(delta)); + ArcMap(fst, QuantizeMapper(delta)); EncodeMapper encoder(kEncodeLabels | kEncodeWeights, ENCODE); Encode(fst, &encoder); internal::AcceptorMinimize(fst); diff --git a/src/fstext/lattice-utils-inl.h b/src/fstext/lattice-utils-inl.h index c97a538dd1d..5d52ed3aa5a 100644 --- a/src/fstext/lattice-utils-inl.h +++ b/src/fstext/lattice-utils-inl.h @@ -268,7 +268,7 @@ void ConvertFstToLattice( MutableFst > > *ofst) { int32 num_states_cache = 50000; fst::CacheOptions cache_opts(true, num_states_cache); - fst::MapFstOptions mapfst_opts(cache_opts); + fst::ArcMapFstOptions mapfst_opts(cache_opts); StdToLatticeMapper mapper; MapFst >, StdToLatticeMapper > map_fst(ifst, mapper, mapfst_opts); From 97a3ed0074fd355fdb05b85a24ff1428a57f356a Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Thu, 23 Feb 2023 21:24:18 +0300 Subject: [PATCH 3/4] Support openfst-1.8.1 --- src/fstext/kaldi-fst-io-inl.h | 2 +- src/fstext/lattice-weight.h | 16 ++++++++-------- src/lat/kaldi-lattice.cc | 2 +- src/lat/lattice-functions-transition-model.cc | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/fstext/kaldi-fst-io-inl.h b/src/fstext/kaldi-fst-io-inl.h index f7bb3a7c2b5..01047919c22 100644 --- a/src/fstext/kaldi-fst-io-inl.h +++ b/src/fstext/kaldi-fst-io-inl.h @@ -99,7 +99,7 @@ void ReadFstKaldi(std::istream &is, bool binary, fst->DeleteStates(); string line; size_t nline = 0; - string separator = FLAGS_fst_field_separator + "\r\n"; + string separator = FST_FLAGS_fst_field_separator + "\r\n"; while (std::getline(is, line)) { nline++; vector col; diff --git a/src/fstext/lattice-weight.h b/src/fstext/lattice-weight.h index 6e7737a195d..f03ed702588 100644 --- a/src/fstext/lattice-weight.h +++ b/src/fstext/lattice-weight.h @@ -396,8 +396,8 @@ inline bool ApproxEqual(const LatticeWeightTpl &w1, template inline std::ostream &operator <<(std::ostream &strm, const LatticeWeightTpl &w) { LatticeWeightTpl::WriteFloatType(strm, w.Value1()); - CHECK(FLAGS_fst_weight_separator.size() == 1); - strm << FLAGS_fst_weight_separator[0]; // comma by default; + CHECK(FST_FLAGS_fst_weight_separator.size() == 1); + strm << FST_FLAGS_fst_weight_separator[0]; // comma by default; // may or may not be settable from Kaldi programs. LatticeWeightTpl::WriteFloatType(strm, w.Value2()); return strm; @@ -405,9 +405,9 @@ inline std::ostream &operator <<(std::ostream &strm, const LatticeWeightTpl inline std::istream &operator >>(std::istream &strm, LatticeWeightTpl &w1) { - CHECK(FLAGS_fst_weight_separator.size() == 1); + CHECK(FST_FLAGS_fst_weight_separator.size() == 1); // separator defaults to ',' - return w1.ReadNoParen(strm, FLAGS_fst_weight_separator[0]); + return w1.ReadNoParen(strm, FST_FLAGS_fst_weight_separator[0]); } @@ -726,8 +726,8 @@ inline CompactLatticeWeightTpl Divide(const CompactLatticeW template inline std::ostream &operator <<(std::ostream &strm, const CompactLatticeWeightTpl &w) { strm << w.Weight(); - CHECK(FLAGS_fst_weight_separator.size() == 1); - strm << FLAGS_fst_weight_separator[0]; // comma by default. + CHECK(FST_FLAGS_fst_weight_separator.size() == 1); + strm << FST_FLAGS_fst_weight_separator[0]; // comma by default. for(size_t i = 0; i < w.String().size(); i++) { strm << w.String()[i]; if (i+1 < w.String().size()) @@ -743,8 +743,8 @@ inline std::istream &operator >>(std::istream &strm, CompactLatticeWeightTpl col; diff --git a/src/lat/lattice-functions-transition-model.cc b/src/lat/lattice-functions-transition-model.cc index 6172610dca0..a8cd7b7e2dd 100644 --- a/src/lat/lattice-functions-transition-model.cc +++ b/src/lat/lattice-functions-transition-model.cc @@ -248,13 +248,13 @@ bool TestWordAlignedLattice(const WordAlignLatticeLexiconInfo &lexicon_info, int32 num_paths = 5, seed = Rand(), max_path_length = -1; BaseFloat delta = 0.2; // some lattices have large costs -> use large delta. - FLAGS_v = GetVerboseLevel(); // set the OpenFst verbose level to the Kaldi + FST_FLAGS_v = GetVerboseLevel(); // set the OpenFst verbose level to the Kaldi // verbose level. if (!RandEquivalent(clat, aligned_clat, num_paths, delta, seed, max_path_length)) { KALDI_WARN << "Equivalence test failed during lattice alignment."; return false; } - FLAGS_v = 0; + FST_FLAGS_v = 0; return (num_err == 0); } From 2738ab12209700a6fccb8db32f7f6979a864ab65 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Thu, 23 Feb 2023 21:24:25 +0300 Subject: [PATCH 4/4] Support openfst-1.8.2 --- src/base/kaldi-types.h | 43 +++++++-------------------- src/fstext/lattice-utils-inl.h | 2 +- src/kws/kws-functions.cc | 4 +-- src/kws/kws-functions2.cc | 2 +- src/lat/arctic-weight.h | 2 +- src/lat/determinize-lattice-pruned.cc | 6 ++-- src/lat/minimize-lattice.cc | 2 +- src/lat/push-lattice.cc | 4 +-- src/lat/sausages.cc | 2 +- src/nnet3/nnet-batch-compute.cc | 2 +- src/online/online-tcp-source.cc | 2 +- src/rnnlm/rnnlm-test-utils.cc | 2 +- src/tree/tree-renderer.cc | 4 +-- 13 files changed, 28 insertions(+), 49 deletions(-) diff --git a/src/base/kaldi-types.h b/src/base/kaldi-types.h index 7ebf4f85386..68d5578a5fb 100644 --- a/src/base/kaldi-types.h +++ b/src/base/kaldi-types.h @@ -39,37 +39,16 @@ typedef float BaseFloat; // we find in the future lacks stdint.h #include -// for discussion on what to do if you need compile kaldi -// without OpenFST, see the bottom of this this file -#include - -namespace kaldi { - using ::int16; - using ::int32; - using ::int64; - using ::uint16; - using ::uint32; - using ::uint64; - typedef float float32; - typedef double double64; -} // end namespace kaldi - -// In a theoretical case you decide compile Kaldi without the OpenFST -// comment the previous namespace statement and uncomment the following -/* -namespace kaldi { - typedef int8_t int8; - typedef int16_t int16; - typedef int32_t int32; - typedef int64_t int64; - - typedef uint8_t uint8; - typedef uint16_t uint16; - typedef uint32_t uint32; - typedef uint64_t uint64; - typedef float float32; - typedef double double64; -} // end namespace kaldi -*/ +typedef int8_t int8; +typedef int16_t int16; +typedef int32_t int32; +typedef int64_t int64; + +typedef uint8_t uint8; +typedef uint16_t uint16; +typedef uint32_t uint32; +typedef uint64_t uint64; +typedef float float32; +typedef double double64; #endif // KALDI_BASE_KALDI_TYPES_H_ diff --git a/src/fstext/lattice-utils-inl.h b/src/fstext/lattice-utils-inl.h index 5d52ed3aa5a..03ac9947c5c 100644 --- a/src/fstext/lattice-utils-inl.h +++ b/src/fstext/lattice-utils-inl.h @@ -270,7 +270,7 @@ void ConvertFstToLattice( fst::CacheOptions cache_opts(true, num_states_cache); fst::ArcMapFstOptions mapfst_opts(cache_opts); StdToLatticeMapper mapper; - MapFst >, + ArcMapFst >, StdToLatticeMapper > map_fst(ifst, mapper, mapfst_opts); *ofst = map_fst; } diff --git a/src/kws/kws-functions.cc b/src/kws/kws-functions.cc index 3e27226f13c..e6819562f82 100644 --- a/src/kws/kws-functions.cc +++ b/src/kws/kws-functions.cc @@ -175,7 +175,7 @@ bool CreateFactorTransducer(const CompactLattice &clat, // Now we map the CompactLattice to VectorFst. We drop the // alignment information and only keep the negated log-probs - Map(clat, factor_transducer, CompactLatticeToKwsProductFstMapper()); + ArcMap(clat, factor_transducer, CompactLatticeToKwsProductFstMapper()); // Now do the weight pushing manually on the CompactLattice format. Note that // the alphas and betas in Kaldi are stored as the log-probs, not the negated @@ -366,7 +366,7 @@ void MaybeDoSanityCheck(const KwsProductFst &product_transducer) { if (GetVerboseLevel() < 2) return; KwsLexicographicFst index_transducer; - Map(product_transducer, + ArcMap(product_transducer, &index_transducer, KwsProductFstToKwsLexicographicFstMapper()); diff --git a/src/kws/kws-functions2.cc b/src/kws/kws-functions2.cc index 71f5583af19..9e610d2054e 100644 --- a/src/kws/kws-functions2.cc +++ b/src/kws/kws-functions2.cc @@ -92,7 +92,7 @@ void DoFactorMerging(KwsProductFst *factor_transducer, Decode(&dest_transducer, encoder); - Map(dest_transducer, index_transducer, KwsProductFstToKwsLexicographicFstMapper()); + ArcMap(dest_transducer, index_transducer, KwsProductFstToKwsLexicographicFstMapper()); } void DoFactorDisambiguation(KwsLexicographicFst *index_transducer) { diff --git a/src/lat/arctic-weight.h b/src/lat/arctic-weight.h index 5c0c6d3c416..39775ac8950 100644 --- a/src/lat/arctic-weight.h +++ b/src/lat/arctic-weight.h @@ -50,7 +50,7 @@ class ArcticWeightTpl : public FloatWeightTpl { static const std::string &Type() { static const std::string type = std::string("arctic") + - FloatWeightTpl::GetPrecisionString(); + std::string(FloatWeightTpl::GetPrecisionString()); return type; } diff --git a/src/lat/determinize-lattice-pruned.cc b/src/lat/determinize-lattice-pruned.cc index dbdd9af4645..ff3d65d57f3 100644 --- a/src/lat/determinize-lattice-pruned.cc +++ b/src/lat/determinize-lattice-pruned.cc @@ -1499,7 +1499,7 @@ bool DeterminizeLatticePhonePrunedWrapper( } ILabelCompare ilabel_comp; ArcSort(ifst, ilabel_comp); - ans = DeterminizeLatticePhonePruned( + ans = DeterminizeLatticePhonePruned( trans_model, ifst, beam, ofst, opts); Connect(ofst); return ans; @@ -1523,7 +1523,7 @@ bool DeterminizeLatticePruned( DeterminizeLatticePrunedOptions opts); template -bool DeterminizeLatticePhonePruned( +bool DeterminizeLatticePhonePruned( const kaldi::TransitionInformation &trans_model, const ExpandedFst &ifst, double prune, @@ -1531,7 +1531,7 @@ bool DeterminizeLatticePhonePruned( DeterminizeLatticePhonePrunedOptions opts); template -bool DeterminizeLatticePhonePruned( +bool DeterminizeLatticePhonePruned( const kaldi::TransitionInformation &trans_model, MutableFst *ifst, double prune, diff --git a/src/lat/minimize-lattice.cc b/src/lat/minimize-lattice.cc index ada90efadce..416f1e62e93 100644 --- a/src/lat/minimize-lattice.cc +++ b/src/lat/minimize-lattice.cc @@ -279,7 +279,7 @@ bool MinimizeCompactLattice( // Instantiate for CompactLattice type. template -bool MinimizeCompactLattice( +bool MinimizeCompactLattice( MutableFst *clat, float delta); diff --git a/src/lat/push-lattice.cc b/src/lat/push-lattice.cc index f4eb322d002..38a990d74d3 100644 --- a/src/lat/push-lattice.cc +++ b/src/lat/push-lattice.cc @@ -280,11 +280,11 @@ bool PushCompactLatticeWeights( // Instantiate for CompactLattice. template -bool PushCompactLatticeStrings( +bool PushCompactLatticeStrings( MutableFst *clat); template -bool PushCompactLatticeWeights( +bool PushCompactLatticeWeights( MutableFst *clat); } // namespace fst diff --git a/src/lat/sausages.cc b/src/lat/sausages.cc index b851bc3604c..03b384f93f1 100644 --- a/src/lat/sausages.cc +++ b/src/lat/sausages.cc @@ -325,7 +325,7 @@ void MinimumBayesRisk::PrepareLatticeAndInitStats(CompactLattice *clat) { // paper (i.e. just one final state). // Topologically sort the lattice, if not already sorted. - kaldi::uint64 props = clat->Properties(fst::kFstProperties, false); + uint64 props = clat->Properties(fst::kFstProperties, false); if (!(props & fst::kTopSorted)) { if (fst::TopSort(clat) == false) KALDI_ERR << "Cycles detected in lattice."; diff --git a/src/nnet3/nnet-batch-compute.cc b/src/nnet3/nnet-batch-compute.cc index 0e07834ed3d..fd84c4e56fe 100644 --- a/src/nnet3/nnet-batch-compute.cc +++ b/src/nnet3/nnet-batch-compute.cc @@ -1503,7 +1503,7 @@ NnetBatchDecoder::~NnetBatchDecoder() { } // Print diagnostics. - kaldi::int64 input_frame_count = + int64 input_frame_count = frame_count_ * computer_->GetOptions().frame_subsampling_factor; int32 num_threads = static_cast(decode_threads_.size()); diff --git a/src/online/online-tcp-source.cc b/src/online/online-tcp-source.cc index 6d63493b4bd..8421073d559 100644 --- a/src/online/online-tcp-source.cc +++ b/src/online/online-tcp-source.cc @@ -24,7 +24,7 @@ namespace kaldi { -typedef kaldi::int32 int32; +typedef int32 int32; OnlineTcpVectorSource::OnlineTcpVectorSource(int32 socket) : socket_desc(socket), diff --git a/src/rnnlm/rnnlm-test-utils.cc b/src/rnnlm/rnnlm-test-utils.cc index 32e8b5a4236..f415f257a06 100644 --- a/src/rnnlm/rnnlm-test-utils.cc +++ b/src/rnnlm/rnnlm-test-utils.cc @@ -78,7 +78,7 @@ void ConvertToInteger( for (int i = 0; i < string_sentences.size(); i++) { (*int_sentences)[i].resize(string_sentences[i].size()); for (int j = 0; j < string_sentences[i].size(); j++) { - kaldi::int64 key = symbol_table.Find(string_sentences[i][j]); + int64 key = symbol_table.Find(string_sentences[i][j]); KALDI_ASSERT(key != -1); // fst::kNoSymbol (*int_sentences)[i][j] = static_cast(key); } diff --git a/src/tree/tree-renderer.cc b/src/tree/tree-renderer.cc index bbaa5cda162..8e3b463fe7a 100644 --- a/src/tree/tree-renderer.cc +++ b/src/tree/tree-renderer.cc @@ -67,7 +67,7 @@ TreeRenderer::MakeEdgeLabel(const EventKeyType &key, oss << ", "; if (key != kPdfClass) { std::string phone = - phone_syms_.Find(static_cast(*child)); + phone_syms_.Find(static_cast(*child)); if (phone.empty()) KALDI_ERR << "No phone found for Phone ID " << *child; oss << phone; @@ -137,7 +137,7 @@ void TreeRenderer::RenderTable(const EventType *query, int32 id) { ExpectToken(is_, binary_, "NULL"); // consume the invalid/NULL entry continue; } - std::string phone = phone_syms_.Find(static_cast(t)); + std::string phone = phone_syms_.Find(static_cast(t)); if (phone.empty()) KALDI_ERR << "Phone ID found in a TableEventMap, but not in the " << "phone symbol table! ID: " << t;