首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu 16.04上的Kaldi工具包安装错误

Ubuntu 16.04上的Kaldi工具包安装错误
EN

Stack Overflow用户
提问于 2017-03-08 21:25:44
回答 4查看 4.1K关注 0票数 1

嗨,我试图安装卡尔迪工具包,用于Ubuntu16.04上的语音识别。我遵循了安装文件中的说明。

(1)使用工具/按照安装说明进行安装。

遵循工具中安装文件中的过程并得到如下输出:

$extras/check_DUSECENCes.sh

../tools/extras/check_dependencies.sh: all OK.

并执行make,没有任何错误。下面是最后几行,以防万一你想看看

$ make

代码语言:javascript
复制
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.

现在我开始下一步

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

在src文件夹中,执行具有以下输出的configure

$./配置

Configuring ... Backing up kaldi.mk to kaldi.mk.bak ... Checking compiler g++-4.9 ... Checking OpenFst library in /home/xxx/Downloads/kaldi/tools/openfst ... Doing OS specific configurations ... On Linux: Checking for linear algebra header files ... Using ATLAS as the linear algebra library. Successfully configured for Debian/Ubuntu Linux [dynamic libraries] with ATLASLIBS =/usr/lib/libatlas.so.3 /usr/lib/libf77blas.so.3 /usr/lib/libcblas.so.3 /usr/lib/liblapack_atlas.so.3 CUDA will not be used! If you have already installed cuda drivers and cuda toolkit, try using --cudatk-dir=... option. Note: this is only relevant for neural net experiments Info: configuring Kaldi not to link with Speex (don't worry, it's only needed if you intend to use 'compress-uncompress-speex', which is very unlikely) SUCCESS To compile: make clean -j; make depend -j; make -j ... or e.g. -j 10, instead of -j, to use a specified number of CPUs debug mode enabled... + exit 0

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

$ make

代码语言:javascript
复制
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

我甚至手动搜索了库,它们存在于../tools/openfst位置中。我甚至尝试过在系统范围内安装openfst,但什么也没成功。任何帮助都是徒劳无功。谢谢!

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2017-05-05 04:27:56

我用g++-5解决了它。Ubuntu16.04默认使用g++-5作为预装包,当我尝试用g++-4.9编译Kaldi并与使用g++-5的Ubuntu包链接时,链接器会导致未定义的引用。我和其他图书馆也面临着类似的问题。

票数 0
EN

Stack Overflow用户

发布于 2017-04-30 09:01:48

斯利尼瓦斯

我也在使用ubuntu16.04LTS,我建议你看看这个网站,并逐步遵循程序。我想它能解决你的问题。

http://jrmeyer.github.io/kaldi/2016/01/26/Installing-Kaldi.html

票数 0
EN

Stack Overflow用户

发布于 2017-07-18 10:32:36

为了解决任何这样的错误,我一直遵循以下步骤:

  • 使用g++-4.8编译kaldi源代码。
  • 在配置命令中添加共享标志,例如CXX=g++-4.8 ./-共享
  • 在src目录中生成之前,也会产生依赖关系(),例如sudo =g++-4.8
  • 在创建和添加g++-4.8指令时使用根权限,例如sudo make =g++-4.8
  • 之后,使用编译在线扩展,sudo使ext CXX=g++-4.8

希望这能解决你的问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42682188

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档