From 15be70b6b862133d6d4bd2f5da5644576538dbca Mon Sep 17 00:00:00 2001 From: Michael McAuliffe Date: Mon, 16 Oct 2023 17:22:38 -0700 Subject: [PATCH] Clean up headers (#10) --- extensions/decoder/decoder.cpp | 1 + extensions/fstext/pybind_fstext.h | 2 ++ extensions/hmm/hmm.cpp | 1 - extensions/lm/lm.cpp | 1 + extensions/matrix/matrix.cpp | 2 -- extensions/matrix/pybind_matrix.h | 1 + extensions/pybind/kaldi_pybind.h | 12 ------------ extensions/transform/transform.cpp | 1 - extensions/util/util.cpp | 1 - 9 files changed, 5 insertions(+), 17 deletions(-) diff --git a/extensions/decoder/decoder.cpp b/extensions/decoder/decoder.cpp index 5865664..53d3e6c 100644 --- a/extensions/decoder/decoder.cpp +++ b/extensions/decoder/decoder.cpp @@ -22,6 +22,7 @@ #include "gmm/diag-gmm.h" #include "gmm/decodable-am-diag-gmm.h" #include "lat/lattice-functions.h" +#include "fstext/pybind_fstext.h" using namespace kaldi; using namespace fst; diff --git a/extensions/fstext/pybind_fstext.h b/extensions/fstext/pybind_fstext.h index 3104a54..e0e3860 100644 --- a/extensions/fstext/pybind_fstext.h +++ b/extensions/fstext/pybind_fstext.h @@ -18,6 +18,8 @@ #include "fstext/kaldi-fst-io.h" #include "fstext/lattice-utils.h" #include "fstext/lattice-utils-inl.h" +#include +#include "_pywrapfst.h" using namespace fst; diff --git a/extensions/hmm/hmm.cpp b/extensions/hmm/hmm.cpp index 0e47a87..8ed3964 100644 --- a/extensions/hmm/hmm.cpp +++ b/extensions/hmm/hmm.cpp @@ -10,7 +10,6 @@ #include "fstext/table-matcher.h" #include "fstext/fstext-utils.h" #include "fstext/context-fst.h" -#include using namespace kaldi; using namespace fst; diff --git a/extensions/lm/lm.cpp b/extensions/lm/lm.cpp index 218b7bc..0e59c60 100644 --- a/extensions/lm/lm.cpp +++ b/extensions/lm/lm.cpp @@ -5,6 +5,7 @@ #include "lm/const-arpa-lm.h" #include "lm/kaldi-rnnlm.h" #include "lm/mikolov-rnnlm-lib.h" +#include "fstext/pybind_fstext.h" using namespace kaldi; using namespace fst; diff --git a/extensions/matrix/matrix.cpp b/extensions/matrix/matrix.cpp index 25ba889..fdf954b 100644 --- a/extensions/matrix/matrix.cpp +++ b/extensions/matrix/matrix.cpp @@ -6,8 +6,6 @@ #include "matrix/kaldi-vector.h" #include "matrix/matrix-common.h" #include "matrix/sparse-matrix.h" -#include -#include "util/pybind_util.h" using namespace kaldi; diff --git a/extensions/matrix/pybind_matrix.h b/extensions/matrix/pybind_matrix.h index 60fb628..3fec880 100644 --- a/extensions/matrix/pybind_matrix.h +++ b/extensions/matrix/pybind_matrix.h @@ -3,6 +3,7 @@ #define KALPY_PYBIND_MATRIX_H_ #include "pybind/kaldi_pybind.h" +#include "util/pybind_util.h" void init_matrix(py::module &); diff --git a/extensions/pybind/kaldi_pybind.h b/extensions/pybind/kaldi_pybind.h index b6723a3..d2ef2fd 100644 --- a/extensions/pybind/kaldi_pybind.h +++ b/extensions/pybind/kaldi_pybind.h @@ -27,18 +27,6 @@ #include #include #include -#include -#include -#include "fst/vector-fst.h" -#include "fst/fst.h" -#include "fst/fstlib.h" -#include "fst/fst-decl.h" -#include -#include -#include "_pywrapfst.h" - - -static std::mutex cout_mutex; namespace py = pybind11; diff --git a/extensions/transform/transform.cpp b/extensions/transform/transform.cpp index b910012..f8b7771 100644 --- a/extensions/transform/transform.cpp +++ b/extensions/transform/transform.cpp @@ -15,7 +15,6 @@ #include "transform/transform-common.h" #include "lat/kaldi-lattice.h" #include "lat/lattice-functions.h" -#include using namespace kaldi; diff --git a/extensions/util/util.cpp b/extensions/util/util.cpp index 8f3c5bc..3dedd0f 100644 --- a/extensions/util/util.cpp +++ b/extensions/util/util.cpp @@ -1,6 +1,5 @@ #include "util/pybind_util.h" -#include #include "util/kaldi-table.h" #include "util/kaldi-io.h" #include "util/kaldi-holder-inl.h"