alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
8.16k stars 1.12k forks source link

packaging vosk and openfst #1182

Closed johngebbie closed 1 year ago

johngebbie commented 2 years ago

Hello, I'm trying to package Vosk and I need to use system packages for the dependencies to get it accepted. I've got it working with system packages of openblas and (c)lapack, but I'm struggling with openfst. There isn't an openfst package so I'll need to package it itself, but packages need to be the latest version and Vosk is currently using 1.8.0 not 1.8.2.

When I tried to build the Vosk Kaldi with openfst 1.8.2, I got a big stream of errors about the lack of <fst/types.h> So I commented out #include <fst/types.h> in base/kaldi-types.h, and also seemed to need to comment/uncomment the two typedefs blocks in the same file.

Here is the output now of make -j $(nproc) online2 lm rnnlm with a big chunk in the middle omitted for github:

test -d /home/john/tmprojects/vosk-newopenfst/kaldi/src/lib || mkdir /home/john/tmprojects/vosk-newopenfst/kaldi/src/lib
The version of configure script matches kaldi.mk version. Good.
make -C base
make[1]: Entering directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/base'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/base'
make -C matrix
make[1]: Entering directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/matrix'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/matrix'
make -C util
make[1]: Entering directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/util'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/util'
make -C cudamatrix
make -C tree
make[1]: Entering directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/cudamatrix'
make[1]: Entering directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/tree'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/cudamatrix'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/tree'
make -C fstext
make -C hmm
make -C gmm
make[1]: Entering directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/fstext'
make[1]: Entering directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/hmm'
make[1]: Entering directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/gmm'
c++ -std=c++17 -I.. -isystem /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include -O1  -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_OPENBLAS -I/home/john/tmprojects/vosk-newopenfst/kaldi/tools/OpenBLAS/install/include -msse -msse2 -pthread -g -fPIC -DUSE_KALDI_SVD -DKALDI_NO_EXPF   -c -o mle-am-diag-gmm.o mle-am-diag-gmm.cc
c++ -std=c++17 -I.. -isystem /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include -O1  -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_OPENBLAS -I/home/john/tmprojects/vosk-newopenfst/kaldi/tools/OpenBLAS/install/include -msse -msse2 -pthread -g -fPIC -DUSE_KALDI_SVD -DKALDI_NO_EXPF   -c -o full-gmm.o full-gmm.cc
c++ -std=c++17 -I.. -isystem /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include -O1  -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_OPENBLAS -I/home/john/tmprojects/vosk-newopenfst/kaldi/tools/OpenBLAS/install/include -msse -msse2 -pthread -g -fPIC -DUSE_KALDI_SVD -DKALDI_NO_EXPF   -c -o hmm-utils.o hmm-utils.cc
c++ -std=c++17 -I.. -isystem /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include -O1 -Wno-sign-compare -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_OPENBLAS -I/home/john/tmprojects/vosk-newopenfst/kaldi/tools/OpenBLAS/install/include -msse -msse2 -pthread -g -fPIC -DUSE_KALDI_SVD -DKALDI_NO_EXPF   -c -o kaldi-fst-io.o kaldi-fst-io.cc
c++ -std=c++17 -I.. -isystem /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include -O1  -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_OPENBLAS -I/home/john/tmprojects/vosk-newopenfst/kaldi/tools/OpenBLAS/install/include -msse -msse2 -pthread -g -fPIC -DUSE_KALDI_SVD -DKALDI_NO_EXPF   -c -o tree-accu.o tree-accu.cc
In file included from ../fstext/kaldi-fst-io.h:157,
                 from kaldi-fst-io.cc:22:
../fstext/kaldi-fst-io-inl.h: In function 'void fst::ReadFstKaldi(std::istream&, bool, fst::VectorFst<Arc>*)':
../fstext/kaldi-fst-io-inl.h:102:24: error: 'FLAGS_fst_field_separator' was not declared in this scope; did you mean 'FST_FLAGS_fst_field_separator'?
  102 |     string separator = FLAGS_fst_field_separator + "\r\n";
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                        FST_FLAGS_fst_field_separator
In file included from ../fstext/deterministic-fst-inl.h:25,
                 from ../fstext/deterministic-fst.h:333,
                 from ../fstext/context-fst.h:62,
                 from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/fstext-utils.h:91:40: error: 'uint32' has not been declared
   91 | void PushInLog(VectorFst<StdArc> *fst, uint32 ptype, float delta = kDelta) {
      |                                        ^~~~~~
In file included from ../fstext/fstext-utils-inl.h:29,
                 from ../fstext/fstext-utils.h:425,
                 from ../fstext/deterministic-fst-inl.h:25,
                 from ../fstext/deterministic-fst.h:333,
                 from ../fstext/context-fst.h:62,
                 from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/pre-determinize.h:83:1: error: 'int64' does not name a type; did you mean 'rintf64'?
   83 | int64 DeleteISymbols(MutableFst<Arc> *fst, std::vector<typename Arc::Label> symsIn);
      | ^~~~~
      | rintf64
In file included from ../fstext/pre-determinize.h:94,
                 from ../fstext/fstext-utils-inl.h:29,
                 from ../fstext/fstext-utils.h:425,
                 from ../fstext/deterministic-fst-inl.h:25,
                 from ../fstext/deterministic-fst.h:333,
                 from ../fstext/context-fst.h:62,
                 from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/pre-determinize-inl.h: In function 'void fst::PreDeterminize(fst::MutableFst<Arc>*, typename Arc::Label, std::vector<B>*)':
../fstext/pre-determinize-inl.h:332:5: error: 'uint64' was not declared in this scope; did you mean 'kaldi::uint64'?
  332 |     uint64 props = fst->Properties(kAccessible|kCoAccessible, true);  // true-> computes properties if unknown at time when called.
      |     ^~~~~~
      |     kaldi::uint64
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-utils.h:23,
                 from hmm-utils.cc:23:
../base/kaldi-types.h:68:20: note: 'kaldi::uint64' declared here
   68 |   typedef uint64_t uint64;
      |                    ^~~~~~
In file included from ../fstext/pre-determinize.h:94,
                 from ../fstext/fstext-utils-inl.h:29,
                 from ../fstext/fstext-utils.h:425,
                 from ../fstext/deterministic-fst-inl.h:25,
                 from ../fstext/deterministic-fst.h:333,
                 from ../fstext/context-fst.h:62,
                 from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/pre-determinize-inl.h:333:9: error: 'props' was not declared in this scope
  333 |     if (props != (kAccessible|kCoAccessible)) {  // All states are not both accessible and co-accessible...
      |         ^~~~~
../fstext/pre-determinize-inl.h:524:5: error: 'int64' was not declared in this scope; did you mean 'kaldi::int64'?
  524 |     int64 n = -1;
      |     ^~~~~
      |     kaldi::int64
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-utils.h:23,
                 from hmm-utils.cc:23:
../base/kaldi-types.h:63:20: note: 'kaldi::int64' declared here
   63 |   typedef int64_t  int64;
      |                    ^~~~~
In file included from ../fstext/pre-determinize.h:94,
                 from ../fstext/fstext-utils-inl.h:29,
                 from ../fstext/fstext-utils.h:425,
                 from ../fstext/deterministic-fst-inl.h:25,
                 from ../fstext/deterministic-fst.h:333,
                 from ../fstext/context-fst.h:62,
                 from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/pre-determinize-inl.h:528:7: error: 'n' was not declared in this scope
  528 |       n = std::max(n, (int64) m_iter->second);  // m_iter->second is of type size_t.
      |       ^
../fstext/pre-determinize-inl.h:528:30: error: expected ')' before 'm_iter'
  528 |       n = std::max(n, (int64) m_iter->second);  // m_iter->second is of type size_t.
      |                   ~          ^~~~~~~
      |                              )
../fstext/pre-determinize-inl.h:531:5: error: 'n' was not declared in this scope
  531 |     n++;  // This is now the number of symbols we must add.
      |     ^
../fstext/pre-determinize-inl.h:532:35: error: 'int64' does not name a type; did you mean 'rintf64'?
  532 |     for (size_t i = 0;static_cast<int64>(i)<n;i++) symsOut->push_back(first_new_sym + i);
      |                                   ^~~~~
      |                                   rintf64
../fstext/pre-determinize-inl.h: At global scope:
../fstext/pre-determinize-inl.h:651:1: error: 'int64' does not name a type; did you mean 'rintf64'?
  651 | int64 DeleteISymbols(MutableFst<Arc> *fst, std::vector<typename Arc::Label> isyms) {
      | ^~~~~
      | rintf64
In file included from ../fstext/fstext-utils.h:425,
                 from ../fstext/deterministic-fst-inl.h:25,
                 from ../fstext/deterministic-fst.h:333,
                 from ../fstext/context-fst.h:62,
                 from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/fstext-utils-inl.h:128:3: error: 'uint64' does not name a type; did you mean 'rintf64'?
  128 |   uint64 Properties(uint64 props) const {
      |   ^~~~~~
      |   rintf64
../fstext/fstext-utils-inl.h:183:3: error: 'uint64' does not name a type; did you mean 'rintf64'?
  183 |   uint64 Properties(uint64 props) const {  // Not tested.
      |   ^~~~~~
      |   rintf64
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/context-fst.h:71:52: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
   71 |                      const std::vector<std::vector<int32> > &ilabel_info);
      |                                                    ^~~~~
      |                                                    kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-utils.h:23,
                 from hmm-utils.cc:23:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/context-fst.h:71:57: error: template argument 1 is invalid
   71 |                      const std::vector<std::vector<int32> > &ilabel_info);
      |                                                         ^
../fstext/context-fst.h:71:57: error: template argument 2 is invalid
../fstext/context-fst.h:71:59: error: template argument 1 is invalid
   71 |                      const std::vector<std::vector<int32> > &ilabel_info);
      |                                                           ^
../fstext/context-fst.h:71:59: error: template argument 2 is invalid
../fstext/context-fst.h:75:45: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
   75 |                     std::vector<std::vector<int32> > *ilabel_info);
      |                                             ^~~~~
      |                                             kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-utils.h:23,
                 from hmm-utils.cc:23:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/context-fst.h:75:50: error: template argument 1 is invalid
   75 |                     std::vector<std::vector<int32> > *ilabel_info);
      |                                                  ^
../fstext/context-fst.h:75:50: error: template argument 2 is invalid
../fstext/context-fst.h:75:52: error: template argument 1 is invalid
   75 |                     std::vector<std::vector<int32> > *ilabel_info);
      |                                                    ^
../fstext/context-fst.h:75:52: error: template argument 2 is invalid
../fstext/context-fst.h:79:72: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
   79 | SymbolTable *CreateILabelInfoSymbolTable(const std::vector<std::vector<int32> > &ilabel_info,
      |                                                                        ^~~~~
      |                                                                        kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-utils.h:23,
                 from hmm-utils.cc:23:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/context-fst.h:79:77: error: template argument 1 is invalid
   79 | SymbolTable *CreateILabelInfoSymbolTable(const std::vector<std::vector<int32> > &ilabel_info,
      |                                                                             ^
../fstext/context-fst.h:79:77: error: template argument 2 is invalid
../fstext/context-fst.h:79:79: error: template argument 1 is invalid
   79 | SymbolTable *CreateILabelInfoSymbolTable(const std::vector<std::vector<int32> > &ilabel_info,
      |                                                                               ^
../fstext/context-fst.h:79:79: error: template argument 2 is invalid
../fstext/context-fst.h:109:39: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  109 | void ComposeContext(const std::vector<int32> &disambig_syms,
      |                                       ^~~~~
      |                                       kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-utils.h:23,
                 from hmm-utils.cc:23:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/context-fst.h:109:44: error: template argument 1 is invalid
  109 | void ComposeContext(const std::vector<int32> &disambig_syms,
      |                                            ^
../fstext/context-fst.h:109:44: error: template argument 2 is invalid
../fstext/context-fst.h:110:21: error: 'int32' has not been declared
  110 |                     int32 context_width, int32 central_position,
      |                     ^~~~~
../fstext/context-fst.h:110:42: error: 'int32' has not been declared
  110 |                     int32 context_width, int32 central_position,
      |                                          ^~~~~
../fstext/context-fst.h:113:45: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  113 |                     std::vector<std::vector<int32> > *ilabels_out,
      |                                             ^~~~~
      |                                             kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-utils.h:23,
                 from hmm-utils.cc:23:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/context-fst.h:113:50: error: template argument 1 is invalid
  113 |                     std::vector<std::vector<int32> > *ilabels_out,
      |                                                  ^
../fstext/context-fst.h:113:50: error: template argument 2 is invalid
../fstext/context-fst.h:113:52: error: template argument 1 is invalid
  113 |                     std::vector<std::vector<int32> > *ilabels_out,
      |                                                    ^
../fstext/context-fst.h:113:52: error: template argument 2 is invalid
../fstext/context-fst.h:175:39: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  175 |                     const std::vector<int32>& phones,
      |                                       ^~~~~
      |                                       kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-utils.h:23,
                 from hmm-utils.cc:23:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/context-fst.h:175:44: error: template argument 1 is invalid
  175 |                     const std::vector<int32>& phones,
      |                                            ^
../fstext/context-fst.h:175:44: error: template argument 2 is invalid
../fstext/context-fst.h:176:39: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  176 |                     const std::vector<int32>& disambig_syms,
      |                                       ^~~~~
      |                                       kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-utils.h:23,
                 from hmm-utils.cc:23:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-utils.h:25,
                 from hmm-utils.cc:23:
../fstext/context-fst.h:176:44: error: template argument 1 is invalid
  176 |                     const std::vector<int32>& disambig_syms,
      |                                            ^
../fstext/context-fst.h:176:44: error: template argument 2 is invalid
../fstext/context-fst.h:177:21: error: 'int32' has not been declared
  177 |                     int32 context_width,
      |                     ^~~~~
../fstext/context-fst.h:178:21: error: 'int32' has not been declared
  178 |                     int32 central_position);
      |                     ^~~~~

... OMITTED ...

      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/context-fst.h:244:53: error: template argument 1 is invalid
  244 |                                    std::vector<int32> *full_phone_sequence);
      |                                                     ^
../fstext/context-fst.h:244:53: error: template argument 2 is invalid
../fstext/context-fst.h:249:37: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  249 |   typedef unordered_map<std::vector<int32>, StateId,
      |                                     ^~~~~
      |                                     kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/context-fst.h:249:42: error: template argument 1 is invalid
  249 |   typedef unordered_map<std::vector<int32>, StateId,
      |                                          ^
../fstext/context-fst.h:249:42: error: template argument 2 is invalid
../fstext/context-fst.h:250:45: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  250 |                         kaldi::VectorHasher<int32> > VectorToStateMap;
      |                                             ^~~~~
      |                                             kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/context-fst.h:250:50: error: template argument 1 is invalid
  250 |                         kaldi::VectorHasher<int32> > VectorToStateMap;
      |                                                  ^
../fstext/context-fst.h:250:52: error: template argument 1 is invalid
  250 |                         kaldi::VectorHasher<int32> > VectorToStateMap;
      |                                                    ^
../fstext/context-fst.h:250:52: error: template argument 3 is invalid
../fstext/context-fst.h:250:52: error: template argument 4 is invalid
../fstext/context-fst.h:250:52: error: template argument 5 is invalid
../fstext/context-fst.h:255:37: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  255 |   typedef unordered_map<std::vector<int32>, Label,
      |                                     ^~~~~
      |                                     kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/context-fst.h:255:42: error: template argument 1 is invalid
  255 |   typedef unordered_map<std::vector<int32>, Label,
      |                                          ^
../fstext/context-fst.h:255:42: error: template argument 2 is invalid
../fstext/context-fst.h:256:45: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  256 |                         kaldi::VectorHasher<int32> > VectorToLabelMap;
      |                                             ^~~~~
      |                                             kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/context-fst.h:256:50: error: template argument 1 is invalid
  256 |                         kaldi::VectorHasher<int32> > VectorToLabelMap;
      |                                                  ^
../fstext/context-fst.h:256:52: error: template argument 1 is invalid
  256 |                         kaldi::VectorHasher<int32> > VectorToLabelMap;
      |                                                    ^
../fstext/context-fst.h:256:52: error: template argument 3 is invalid
../fstext/context-fst.h:256:52: error: template argument 4 is invalid
../fstext/context-fst.h:256:52: error: template argument 5 is invalid
../fstext/context-fst.h:262:3: error: 'int32' does not name a type; did you mean 'rintf32'?
  262 |   int32 context_width_;
      |   ^~~~~
      |   rintf32
../fstext/context-fst.h:271:3: error: 'int32' does not name a type; did you mean 'rintf32'?
  271 |   int32 central_position_;
      |   ^~~~~
      |   rintf32
../fstext/context-fst.h:309:3: error: 'int32' does not name a type; did you mean 'rintf32'?
  309 |   int32 pseudo_eps_symbol_;
      |   ^~~~~
      |   rintf32
../fstext/context-fst.h:318:27: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  318 |   std::vector<std::vector<int32> > state_seqs_;
      |                           ^~~~~
      |                           kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/context-fst.h:318:32: error: template argument 1 is invalid
  318 |   std::vector<std::vector<int32> > state_seqs_;
      |                                ^
../fstext/context-fst.h:318:32: error: template argument 2 is invalid
../fstext/context-fst.h:318:34: error: template argument 1 is invalid
  318 |   std::vector<std::vector<int32> > state_seqs_;
      |                                  ^
../fstext/context-fst.h:318:34: error: template argument 2 is invalid
../fstext/context-fst.h:333:27: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  333 |   std::vector<std::vector<int32> > ilabel_info_;
      |                           ^~~~~
      |                           kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:23,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/context-fst.h:333:32: error: template argument 1 is invalid
  333 |   std::vector<std::vector<int32> > ilabel_info_;
      |                                ^
../fstext/context-fst.h:333:32: error: template argument 2 is invalid
../fstext/context-fst.h:333:34: error: template argument 1 is invalid
  333 |   std::vector<std::vector<int32> > ilabel_info_;
      |                                  ^
../fstext/context-fst.h:333:34: error: template argument 2 is invalid
../fstext/context-fst.h: In member function 'void fst::InverseContextFst::SwapIlabelInfo(int*)':
../fstext/context-fst.h:200:77: error: request for member 'swap' in '((fst::InverseContextFst*)this)->fst::InverseContextFst::ilabel_info_', which is of non-class type 'int'
  200 |   void SwapIlabelInfo(std::vector<std::vector<int32> > *vec) { ilabel_info_.swap(*vec); }
      |                                                                             ^~~~
In file included from ../fstext/fstext-lib.h:29,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/table-matcher.h: At global scope:
../fstext/table-matcher.h:218:11: error: 'uint64' does not name a type; did you mean 'rintf64'?
  218 |   virtual uint64 Properties(uint64 props) const { return props; } // simple matcher that does
      |           ^~~~~~
      |           rintf64
../fstext/table-matcher.h:286:11: error: 'uint64' does not name a type; did you mean 'rintf64'?
  286 |   virtual uint64 Properties(uint64 props) const { return impl_->Properties(props); } // simple matcher that does
      |           ^~~~~~
      |           rintf64
In file included from ../fstext/fstext-lib.h:30,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/trivial-factor-weight.h:298:3: error: 'uint32' does not name a type; did you mean 'rintf32'?
  298 |   uint32 mode_;               // factoring arc and/or final weights
      |   ^~~~~~
      |   rintf32
../fstext/trivial-factor-weight.h: In constructor 'fst::internal::TrivialFactorWeightFstImpl<A, F>::TrivialFactorWeightFstImpl(const fst::Fst<Arc>&, const fst::TrivialFactorWeightOptions<A>&)':
../fstext/trivial-factor-weight.h:131:5: error: 'uint64' was not declared in this scope; did you mean 'kaldi::uint64'?
  131 |     uint64 props = fst.Properties(kFstProperties, false);
      |     ^~~~~~
      |     kaldi::uint64
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:68:20: note: 'kaldi::uint64' declared here
   68 |   typedef uint64_t uint64;
      |                    ^~~~~~
In file included from ../fstext/fstext-lib.h:30,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/trivial-factor-weight.h:132:42: error: 'props' was not declared in this scope
  132 |     SetProperties(FactorWeightProperties(props), kCopyProperties);
      |                                          ^~~~~
../fstext/trivial-factor-weight.h: In member function 'void fst::TrivialFactorWeightFst<A, F>::InitStateIterator(fst::StateIteratorData<A>*) const':
../fstext/trivial-factor-weight.h:393:21: error: 'make_unique' is not a member of 'fst'; did you mean 'std::make_unique'?
  393 |   data->base = fst::make_unique<StateIterator<TrivialFactorWeightFst<A, F> > >(*this);
      |                     ^~~~~~~~~~~
In file included from /usr/include/c++/10.2/memory:83,
                 from /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include/fst/fst-decl.h:26,
                 from ../hmm/transition-model.h:26,
                 from ../hmm/hmm-test-utils.h:25,
                 from hmm-test-utils.cc:22:
/usr/include/c++/10.2/bits/unique_ptr.h:973:5: note: 'std::make_unique' declared here
  973 |     make_unique(_Args&&...) = delete;
      |     ^~~~~~~~~~~
In file included from ../fstext/fstext-lib.h:30,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/trivial-factor-weight.h:393:78: error: expected primary-expression before '>' token
  393 |   data->base = fst::make_unique<StateIterator<TrivialFactorWeightFst<A, F> > >(*this);
      |                                                                              ^
In file included from ../fstext/fstext-lib.h:31,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-weight.h: At global scope:
../fstext/lattice-weight.h:122:20: error: 'uint64' does not name a type; did you mean 'rintf64'?
  122 |   static constexpr uint64 Properties() {
      |                    ^~~~~~
      |                    rintf64
In file included from /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include/fst/expanded-fst.h:30,
                 from /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include/fst/fstlib.h:42,
                 from ../fstext/fstext-lib.h:22,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-weight.h: In function 'std::ostream& fst::operator<<(std::ostream&, const fst::LatticeWeightTpl<FloatType>&)':
../fstext/lattice-weight.h:399:9: error: 'FLAGS_fst_weight_separator' was not declared in this scope; did you mean 'FST_FLAGS_fst_weight_separator'?
  399 |   CHECK(FLAGS_fst_weight_separator.size() == 1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
../fstext/lattice-weight.h: In function 'std::istream& fst::operator>>(std::istream&, fst::LatticeWeightTpl<FloatType>&)':
../fstext/lattice-weight.h:408:9: error: 'FLAGS_fst_weight_separator' was not declared in this scope; did you mean 'FST_FLAGS_fst_weight_separator'?
  408 |   CHECK(FLAGS_fst_weight_separator.size() == 1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../fstext/fstext-lib.h:31,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-weight.h: At global scope:
../fstext/lattice-weight.h:506:20: error: 'uint64' does not name a type; did you mean 'rintf64'?
  506 |   static constexpr uint64 Properties() {
      |                    ^~~~~~
      |                    rintf64
../fstext/lattice-weight.h: In member function 'std::istream& fst::CompactLatticeWeightTpl<WeightType, IntType>::Read(std::istream&)':
../fstext/lattice-weight.h:515:5: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  515 |     int32 sz;
      |     ^~~~~
      |     kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:31,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-weight.h:516:21: error: 'sz' was not declared in this scope
  516 |     ReadType(strm, &sz);
      |                     ^~
../fstext/lattice-weight.h:524:14: error: expected ';' before 'i'
  524 |     for(int32 i = 0; i < sz; i++) {
      |              ^~
      |              ;
../fstext/lattice-weight.h:524:22: error: 'i' was not declared in this scope
  524 |     for(int32 i = 0; i < sz; i++) {
      |                      ^
../fstext/lattice-weight.h: In member function 'std::ostream& fst::CompactLatticeWeightTpl<WeightType, IntType>::Write(std::ostream&) const':
../fstext/lattice-weight.h:535:5: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  535 |     int32 sz = static_cast<int32>(string_.size());
      |     ^~~~~
      |     kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:31,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-weight.h:536:21: error: 'sz' was not declared in this scope
  536 |     WriteType(strm, sz);
      |                     ^~
../fstext/lattice-weight.h:537:14: error: expected ';' before 'i'
  537 |     for(int32 i = 0; i < sz; i++)
      |              ^~
      |              ;
../fstext/lattice-weight.h:537:22: error: 'i' was not declared in this scope
  537 |     for(int32 i = 0; i < sz; i++)
      |                      ^
../fstext/lattice-weight.h: At global scope:
../fstext/lattice-weight.h:623:68: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  623 | class NaturalLess<CompactLatticeWeightTpl<LatticeWeightTpl<float>, int32> > {
      |                                                                    ^~~~~
      |                                                                    kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:31,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-weight.h:623:73: error: template argument 2 is invalid
  623 | class NaturalLess<CompactLatticeWeightTpl<LatticeWeightTpl<float>, int32> > {
      |                                                                         ^
../fstext/lattice-weight.h:623:75: error: template argument 1 is invalid
  623 | class NaturalLess<CompactLatticeWeightTpl<LatticeWeightTpl<float>, int32> > {
      |                                                                           ^
../fstext/lattice-weight.h:637:69: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  637 | class NaturalLess<CompactLatticeWeightTpl<LatticeWeightTpl<double>, int32> > {
      |                                                                     ^~~~~
      |                                                                     kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/fstext-lib.h:31,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-weight.h:637:74: error: template argument 2 is invalid
  637 | class NaturalLess<CompactLatticeWeightTpl<LatticeWeightTpl<double>, int32> > {
      |                                                                          ^
../fstext/lattice-weight.h:637:76: error: template argument 1 is invalid
  637 | class NaturalLess<CompactLatticeWeightTpl<LatticeWeightTpl<double>, int32> > {
      |                                                                            ^
In file included from /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include/fst/expanded-fst.h:30,
                 from /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include/fst/fstlib.h:42,
                 from ../fstext/fstext-lib.h:22,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-weight.h: In function 'std::ostream& fst::operator<<(std::ostream&, const fst::CompactLatticeWeightTpl<WeightType, IntType>&)':
../fstext/lattice-weight.h:731:9: error: 'FLAGS_fst_weight_separator' was not declared in this scope; did you mean 'FST_FLAGS_fst_weight_separator'?
  731 |   CHECK(FLAGS_fst_weight_separator.size() == 1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
../fstext/lattice-weight.h: In function 'std::istream& fst::operator>>(std::istream&, fst::CompactLatticeWeightTpl<WeightType, IntType>&)':
../fstext/lattice-weight.h:748:9: error: 'FLAGS_fst_weight_separator' was not declared in this scope; did you mean 'FST_FLAGS_fst_weight_separator'?
  748 |   CHECK(FLAGS_fst_weight_separator.size() == 1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../fstext/fstext-lib.h:32,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-utils.h: At global scope:
../fstext/lattice-utils.h:218:3: error: 'uint64' does not name a type; did you mean 'rintf64'?
  218 |   uint64 Properties(uint64 props) { return props; }
      |   ^~~~~~
      |   rintf64
../fstext/lattice-utils.h:242:3: error: 'uint64' does not name a type; did you mean 'rintf64'?
  242 |   uint64 Properties(uint64 props) { return props; }
      |   ^~~~~~
      |   rintf64
In file included from ../fstext/lattice-utils.h:254,
                 from ../fstext/fstext-lib.h:32,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-utils-inl.h: In function 'void fst::ConvertFstToLattice(const fst::ExpandedFst<fst::ArcTpl<fst::TropicalWeightTpl<float> > >&, fst::MutableFst<fst::ArcTpl<fst::LatticeWeightTpl<FloatType> > >*)':
../fstext/lattice-utils-inl.h:269:3: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  269 |   int32 num_states_cache = 50000;
      |   ^~~~~
      |   kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/lattice-utils.h:254,
                 from ../fstext/fstext-lib.h:32,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/lattice-utils-inl.h:270:38: error: 'num_states_cache' was not declared in this scope
  270 |   fst::CacheOptions cache_opts(true, num_states_cache);
      |                                      ^~~~~~~~~~~~~~~~
In file included from ../fstext/determinize-lattice.h:148,
                 from ../fstext/fstext-lib.h:33,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/determinize-lattice-inl.h: At global scope:
../fstext/determinize-lattice-inl.h:204:3: error: 'int32' does not name a type; did you mean 'rintf32'?
  204 |   int32 MemSize() const {
      |   ^~~~~
      |   rintf32
../fstext/determinize-lattice-inl.h: In member function 'bool fst::LatticeDeterminizer<Weight, IntType>::CheckMemoryUsage()':
../fstext/determinize-lattice-inl.h:469:5: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  469 |     int32 repo_size = repository_.MemSize(),
      |     ^~~~~
      |     kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/determinize-lattice.h:148,
                 from ../fstext/fstext-lib.h:33,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/determinize-lattice-inl.h:473:30: error: 'total_size' was not declared in this scope
  473 |     if (opts_.max_mem > 0 && total_size > opts_.max_mem) { // We passed the memory threshold.
      |                              ^~~~~~~~~~
../fstext/determinize-lattice-inl.h:477:12: error: expected ';' before 'new_repo_size'
  477 |       int32 new_repo_size = repository_.MemSize(),
      |            ^~~~~~~~~~~~~~
      |            ;
../fstext/determinize-lattice-inl.h:481:24: error: 'repo_size' was not declared in this scope
  481 |                     << repo_size << " to " << new_repo_size << " bytes (approximately)";
      |                        ^~~~~~~~~
../fstext/determinize-lattice-inl.h:481:47: error: 'new_repo_size' was not declared in this scope
  481 |                     << repo_size << " to " << new_repo_size << " bytes (approximately)";
      |                                               ^~~~~~~~~~~~~
../fstext/determinize-lattice-inl.h:483:11: error: 'new_total_size' was not declared in this scope
  483 |       if (new_total_size > static_cast<int32>(opts_.max_mem * 0.8)) {
      |           ^~~~~~~~~~~~~~
../fstext/determinize-lattice-inl.h:483:40: error: 'int32' does not name a type; did you mean 'rintf32'?
  483 |       if (new_total_size > static_cast<int32>(opts_.max_mem * 0.8)) {
      |                                        ^~~~~
      |                                        rintf32
../fstext/determinize-lattice-inl.h:488:23: error: 'repo_size' was not declared in this scope
  488 |                    << repo_size << "," << arcs_size << "," << elems_size
      |                       ^~~~~~~~~
../fstext/determinize-lattice-inl.h:488:43: error: 'arcs_size' was not declared in this scope
  488 |                    << repo_size << "," << arcs_size << "," << elems_size
      |                                           ^~~~~~~~~
../fstext/determinize-lattice-inl.h:488:63: error: 'elems_size' was not declared in this scope
  488 |                    << repo_size << "," << arcs_size << "," << elems_size
      |                                                               ^~~~~~~~~~
../fstext/determinize-lattice-inl.h:489:64: error: 'new_repo_size' was not declared in this scope
  489 |                    << "), after rebuilding, repo size was " << new_repo_size;
      |                                                                ^~~~~~~~~~~~~
../fstext/determinize-lattice-inl.h: In member function 'bool fst::LatticeDeterminizer<Weight, IntType>::Determinize(bool*)':
../fstext/determinize-lattice-inl.h:514:7: error: 'int32' was not declared in this scope; did you mean 'kaldi::int32'?
  514 |       int32 repo_size = repository_.MemSize(),
      |       ^~~~~
      |       kaldi::int32
In file included from ../base/kaldi-error.h:34,
                 from ../base/kaldi-common.h:35,
                 from ../hmm/hmm-topology.h:23,
                 from ../hmm/hmm-test-utils.h:24,
                 from hmm-test-utils.cc:22:
../base/kaldi-types.h:62:20: note: 'kaldi::int32' declared here
   62 |   typedef int32_t  int32;
      |                    ^~~~~
In file included from ../fstext/determinize-lattice.h:148,
                 from ../fstext/fstext-lib.h:33,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/determinize-lattice-inl.h:519:14: error: 'total_size' was not declared in this scope
  519 |           << total_size << " bytes (max = " << opts_.max_mem
      |              ^~~~~~~~~~
../fstext/determinize-lattice-inl.h:521:14: error: 'repo_size' was not declared in this scope
  521 |           << repo_size << "," << arcs_size << "," << elems_size << ")";
      |              ^~~~~~~~~
../fstext/determinize-lattice-inl.h:521:34: error: 'arcs_size' was not declared in this scope
  521 |           << repo_size << "," << arcs_size << "," << elems_size << ")";
      |                                  ^~~~~~~~~
../fstext/determinize-lattice-inl.h:521:54: error: 'elems_size' was not declared in this scope
  521 |           << repo_size << "," << arcs_size << "," << elems_size << ")";
      |                                                      ^~~~~~~~~~
In file included from ../fstext/kaldi-fst-io.h:157,
                 from ../fstext/fstext-lib.h:35,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
../fstext/kaldi-fst-io-inl.h: In function 'void fst::ReadFstKaldi(std::istream&, bool, fst::VectorFst<Arc>*)':
../fstext/kaldi-fst-io-inl.h:102:24: error: 'FLAGS_fst_field_separator' was not declared in this scope; did you mean 'FST_FLAGS_fst_field_separator'?
  102 |     string separator = FLAGS_fst_field_separator + "\r\n";
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                        FST_FLAGS_fst_field_separator
make[1]: *** [<builtin>: tree-accu.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include/fst/fstlib.h:53,
                 from ../fstext/fstext-lib.h:22,
                 from ../lat/kaldi-lattice.h:24,
                 from ../hmm/hmm-test-utils.h:26,
                 from hmm-test-utils.cc:22:
/home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include/fst/arc-map.h: In instantiation of 'void fst::ArcMap(fst::MutableFst<Arc>*, C*) [with A = fst::ArcTpl<fst::LogWeightTpl<float> >; C = fst::RemoveSomeInputSymbolsMapper<fst::ArcTpl<fst::LogWeightTpl<float> >, int>]':
/home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include/fst/arc-map.h:189:9:   required from 'void fst::ArcMap(fst::MutableFst<Arc>*, C) [with A = fst::ArcTpl<fst::LogWeightTpl<float> >; C = fst::RemoveSomeInputSymbolsMapper<fst::ArcTpl<fst::LogWeightTpl<float> >, int>]'
../fstext/fstext-utils-inl.h:167:9:   required from 'void fst::RemoveSomeInputSymbols(const std::vector<B>&, fst::MutableFst<Arc>*) [with Arc = fst::ArcTpl<fst::LogWeightTpl<float> >; I = int]'
../fstext/fstext-utils-inl.h:396:25:   required from 'void fst::SafeDeterminizeWrapper(fst::MutableFst<Arc>*, fst::MutableFst<Arc>*, float) [with Arc = fst::ArcTpl<fst::LogWeightTpl<float> >]'
../fstext/fstext-utils-inl.h:456:51:   required from here
/home/john/tmprojects/vosk-newopenfst/kaldi/tools/openfst/include/fst/arc-map.h:182:30: error: 'class fst::RemoveSomeInputSymbolsMapper<fst::ArcTpl<fst::LogWeightTpl<float> >, int>' has no member named 'Properties'
  182 |   fst->SetProperties(mapper->Properties(props), kFstProperties);
      |                      ~~~~~~~~^~~~~~~~~~
make[1]: *** [<builtin>: hmm-utils.o] Error 1
make[1]: *** [<builtin>: hmm-test-utils.o] Error 1
make[1]: Leaving directory '/home/john/tmprojects/vosk-newopenfst/kaldi/src/hmm'
make: *** [Makefile:147: hmm] Error 2

I'm not sure what to do. I see you managed update openfst in the past to 1.8.0: https://github.com/alphacep/openfst/commit/30e2df4484a1b263a6303f3c83146db063ebaa20 Thank you.

nshmyrev commented 2 years ago

Those parts have to be updated as well

Our branch has several important fixes, we do not recommend to use public openfst actually

johngebbie commented 2 years ago

Okay I'll try.

From a quick look, I just see changes to header files that could be patched in the vosk build process.

johngebbie commented 1 year ago

Vosk has been packaged for void linux: https://github.com/void-linux/void-packages/pull/39015 :tada:

nshmyrev commented 1 year ago

Great, huge thanks!