Linux Ubuntu16.04上的Kaldi工具包安装错误

Linux Ubuntu16.04上的Kaldi工具包安装错误,linux,ubuntu,installation,ubuntu-16.04,kaldi,Linux,Ubuntu,Installation,Ubuntu 16.04,Kaldi,您好,我正在尝试在Ubuntu 16.04上安装用于语音识别的Kaldi工具包。我已经按照安装文件中的说明进行了操作 (1) 转到工具/并按照此处的安装说明操作 遵循工具中安装文件中的过程并获得以下输出 $extras/check_dependencies.sh 。/tools/extras/check_dependencies.sh:一切正常。 并在没有任何错误的情况下执行make。这里是最后几行,如果你想看看的话 $make 现在我进入下一步 (2) 转到src/并按照那里的安装说明进行安装

您好,我正在尝试在Ubuntu 16.04上安装用于语音识别的Kaldi工具包。我已经按照安装文件中的说明进行了操作

(1) 转到工具/并按照此处的安装说明操作

遵循工具中安装文件中的过程并获得以下输出

$extras/check_dependencies.sh

。/tools/extras/check_dependencies.sh:一切正常。

并在没有任何错误的情况下执行
make
。这里是最后几行,如果你想看看的话

$make

现在我进入下一步

(2) 转到src/并按照那里的安装说明进行安装

在src文件夹中,使用以下输出执行
configure

美元/配置

正在配置。。。
正在将kaldi.mk备份到kaldi.mk.bak。。。
正在检查编译器g++-4.9。。。
正在/home/xxx/Downloads/kaldi/tools/OpenFst中检查OpenFst库。。。
正在执行特定于操作系统的配置。。。
在Linux上:检查线性代数头文件。。。
使用ATLAS作为线性代数库。
已成功为Debian/Ubuntu Linux[动态库]配置ATLASLIBS=/usr/lib/libatlas.so.3/usr/lib/libf77blas.so.3/usr/lib/libcblas.so.3/usr/lib/liblapack_atlas.so.3
CUDA将不会被使用!如果您已经安装了cuda驱动程序
和cuda工具包,尝试使用--cudatk dir=。。。选项注:这是
仅适用于神经网络实验
信息:将Kaldi配置为不与Speex链接(别担心,只有在您
打算使用“压缩-解压speex”,这不太可能)
成功
编译:makeclean-j;使依赖-j;make-j
... 或者,例如,-j 10,而不是-j,以使用指定数量的CPU
调试模式已启用。。。
+退出0

$make depend
也在没有任何错误的情况下执行。但当我执行make时,我得到以下错误(我没有复制所有内容,因为它很长,如果有人需要,我可以发布完整的输出)

$make

make[2]:输入目录“/home/srinivas/Downloads/kaldi/src/online2”
make[2]:对“所有人”都不做任何事情。
make[2]:离开目录“/home/srinivas/Downloads/kaldi/src/online2”
make-C垃圾箱
make[2]:输入目录“/home/srinivas/Downloads/kaldi/src/bin”
g++-4.9-Wl,-rpath=/home/srinivas/Downloads/kaldi/tools/openfst/lib-rdynamic align equal.o../decoder/kaldi decoder.a../lat/kaldi-lat.a../lm/kaldi lm.a../fstext/kaldi-fstext.a../hmm/kaldi-transform.a../gmm/kaldi gmm.a../tree/kaldi-tree.a../util/kaldi-util.a../thread../base/kaldi base.a/home/srinivas/Downloads/kaldi/tools/openfst/lib/libfst.so/usr/lib/libatlas.so.3/usr/lib77blas.so.3/usr/lib/libcblas.so.3/usr/lib/liblapack_atlas.so.3-lm-lpthread-ldl-o对齐相等
在函数“fst::internal::FstImpl::writefsheader(fst::fst const&,std::ostream&,fst::fst writeoptions const&,int,std::string const&,unsigned long,fst::FstHeader*)中,对齐等号.o:
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:745:对“fst::FstHeader::Write(std::ostream&,std::string const&)const”的未定义引用
../decoder/kaldi decoder.a(training graph compiler.o):在函数'fst::internal::FstImpl::writefstader(fst::fst const&,std::ostream&,fst::FstWriteOptions const&,int,std::string const&,unsigned long,fst::FstHeader*)中:
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:745:对“fst::FstHeader::Write(std::ostream&,std::string const&)const”的未定义引用
../decoder/kaldi decoder.a(training graph compiler.o):在函数'fst::internal::FstImpl::writefstader(fst::fst const&,std::ostream&,fst::FstWriteOptions const&,int,std::string const&,unsigned long,fst::FstHeader*)中:
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:745:对“fst::FstHeader::Write(std::ostream&,std::string const&)const”的未定义引用
../fstext/kaldi fstext.a(kaldi fst io.o):在函数“fst::ReadFstKaldi(std::string)”中:
/home/srinivas/Downloads/kaldi/src/fstext/kaldi fst io.cc:34:对“fst::FstHeader::Read(std::istream&,std::string const&,bool)”的未定义引用
/home/srinivas/Downloads/kaldi/src/fstext/kaldi fst io.cc:37:fst::FstReadOptions::FstReadOptions(std::string const&,fst::FstHeader const*,fst::SymbolTable const*,fst::SymbolTable const*)的未定义引用
../fstext/kaldi fstext.a(kaldi fst io.o):在函数“fst::internal::FstImpl::ReadHeader(std::istream&,fst::FstReadOptions const&,int,fst::FstHeader*)”中:
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:796:对“fst::FstHeader::Read(std::istream&,std::string const&,bool)”的未定义引用
collect2:错误:ld返回了1个退出状态
:目标“对齐相等”的配方失败
使[2]:***[align equal]错误1
make[2]:离开目录“/home/srinivas/Downloads/kaldi/src/bin”
Makefile:142:目标“bin”的配方失败
生成[1]:***[bin]错误2
make[1]:离开目录“/home/srinivas/Downloads/kaldi/src”
Makefile:35:目标“全部”的配方失败
make:**[全部]错误2
我甚至手动搜索了库,它们位于../tools/openfst位置。我甚至尝试在系统范围内安装openfst,但没有任何效果。任何帮助都将受到感谢。谢谢

Srinivas

我也在使用Ubuntu16.04LTS,我建议你们浏览一下这个网站,并遵循一步一步的程序。我想这会解决你的问题

斯里尼瓦斯

我也在使用Ubuntu16.04LTS,我建议你们浏览一下这个网站,并遵循一步一步的程序。我想这会解决你的问题


我用g++-5解决了这个问题。Ubuntu 16.04默认使用g++-5作为预装软件包,当我试图用g++-4.9编译Kaldi并链接使用g++-5的Ubuntu软件包时,链接器导致了未定义的引用。我在其他库中也遇到了类似的问题

我使用g++-5解决了这个问题。默认情况下Ubuntu 16.04
rm -f openfst
ln -s openfst-1.6.1 openfst

Warning: IRSTLM is not installed by default anymore. If you need IRSTLM
Warning: use the script extras/install_irstlm.sh
All done OK.
make[2]: Entering directory '/home/srinivas/Downloads/kaldi/src/online2'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/srinivas/Downloads/kaldi/src/online2'
make -C bin
make[2]: Entering directory '/home/srinivas/Downloads/kaldi/src/bin'
g++-4.9  -Wl,-rpath=/home/srinivas/Downloads/kaldi/tools/openfst/lib -rdynamic  align-equal.o ../decoder/kaldi-decoder.a ../lat/kaldi-lat.a ../lm/kaldi-lm.a ../fstext/kaldi-fstext.a ../hmm/kaldi-hmm.a ../transform/kaldi-transform.a ../gmm/kaldi-gmm.a ../tree/kaldi-tree.a ../util/kaldi-util.a ../thread/kaldi-thread.a ../matrix/kaldi-matrix.a ../base/kaldi-base.a   /home/srinivas/Downloads/kaldi/tools/openfst/lib/libfst.so /usr/lib/libatlas.so.3 /usr/lib/libf77blas.so.3 /usr/lib/libcblas.so.3 /usr/lib/liblapack_atlas.so.3 -lm -lpthread -ldl -o align-equal
align-equal.o: In function `fst::internal::FstImpl<fst::ArcTpl<fst::TropicalWeightTpl<float> > >::WriteFstHeader(fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > const&, std::ostream&, fst::FstWriteOptions const&, int, std::string const&, unsigned long, fst::FstHeader*)':
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:745: undefined reference to `fst::FstHeader::Write(std::ostream&, std::string const&) const'
../decoder/kaldi-decoder.a(training-graph-compiler.o): In function `fst::internal::FstImpl<fst::ReverseArc<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::WriteFstHeader(fst::Fst<fst::ReverseArc<fst::ArcTpl<fst::TropicalWeightTpl<float> > > > const&, std::ostream&, fst::FstWriteOptions const&, int, std::string const&, unsigned long, fst::FstHeader*)':
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:745: undefined reference to `fst::FstHeader::Write(std::ostream&, std::string const&) const'
../decoder/kaldi-decoder.a(training-graph-compiler.o): In function `fst::internal::FstImpl<fst::ArcTpl<fst::LogWeightTpl<float> > >::WriteFstHeader(fst::Fst<fst::ArcTpl<fst::LogWeightTpl<float> > > const&, std::ostream&, fst::FstWriteOptions const&, int, std::string const&, unsigned long, fst::FstHeader*)':
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:745: undefined reference to `fst::FstHeader::Write(std::ostream&, std::string const&) const'
../fstext/kaldi-fstext.a(kaldi-fst-io.o): In function `fst::ReadFstKaldi(std::string)':
/home/srinivas/Downloads/kaldi/src/fstext/kaldi-fst-io.cc:34: undefined reference to `fst::FstHeader::Read(std::istream&, std::string const&, bool)'
/home/srinivas/Downloads/kaldi/src/fstext/kaldi-fst-io.cc:37: undefined reference to `fst::FstReadOptions::FstReadOptions(std::string const&, fst::FstHeader const*, fst::SymbolTable const*, fst::SymbolTable const*)'
../fstext/kaldi-fstext.a(kaldi-fst-io.o): In function `fst::internal::FstImpl<fst::ArcTpl<fst::TropicalWeightTpl<float> > >::ReadHeader(std::istream&, fst::FstReadOptions const&, int, fst::FstHeader*)':
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:796: undefined reference to `fst::FstHeader::Read(std::istream&, std::string const&, bool)'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'align-equal' failed
make[2]: *** [align-equal] Error 1
make[2]: Leaving directory '/home/srinivas/Downloads/kaldi/src/bin'
Makefile:142: recipe for target 'bin' failed
make[1]: *** [bin] Error 2
make[1]: Leaving directory '/home/srinivas/Downloads/kaldi/src'
Makefile:35: recipe for target 'all' failed
make: *** [all] Error 2
sudo apt-get install nvidia-cuda-dev nvidia-cuda-toolkit libcupti-dev g++-4.8
cd tools; make CXX=g++-4.8
cd src; CXX=g++-4.8  ./configure --shared && make-j8