安装语音识别系统PocketSphinx&Sphinxbase

ROS安装教程:

http://wiki.ros.org/pocketsphinx

可以参考另一篇博客http://blog.csdn.net/hanshuning/article/details/53731002


pocketsphinx官网教程

http://cmusphinx.sourceforge.net/wiki/download

Software

CMU Sphinx toolkit has a number of packages for different tasks and applications. It's sometimes confusing what to choose. To cleanup, here is the list

  • Pocketsphinx — recognizer library written in C.
  • Sphinxtrain — acoustic model training tools
  • Sphinxbase — support library required by Pocketsphinx and Sphinxtrain
  • Sphinx4 — adjustable, modifiable recognizer written in Java

我都下载了,用到的可能只有绿色部分

We recommend you to use the latest available releases:



http://cmusphinx.sourceforge.net/wiki/tutorialpocketsphinx

Installation

Pocketsphinx is a library that depends on another library called SphinxBase which provides common functionality across all CMUSphinx projects. To install Pocketsphinx, you need to install both Pocketsphinx and Sphinxbase. It's possible to use Pocketsphinx both in Linux, Windows, on MacOS, iPhone and Android.

First of all, download the released packages pocketsphinx and sphinxbase from project downloads, checkout them from subversion or github. For more details seedownload page.

   解压 例%tar -xzf sphinxbase-5prealpha.tar.gz

Unpack them into same directory. On Windows, you will need to rename 'sphinxbase-X.Y' (where X.Y is the SphinxBase version number) to simply'sphinxbase' to satisfy project pocketsphinx configuration.

THIS TUTORIAL DESCRIBES POCKETSPHINX 5PREALPHA, IT IS NOT GOING TO WORK ON OLDER VERSIONS

Unix-like Installation

To build pocketsphinx in a unix-like environment (such as Linux, Solaris, FreeBSD etc) you need to make sure you have the following dependencies installed: gcc, automake, autoconf, libtool, bison, swig at least version 2.0, python development package, pulseaudio development package. If you want to build without dependencies you can use proper configure options like –without-swig-python but for beginner it is recommended to install all dependencies.

用 %sudo apt-get install [名字]  安装依赖项

You need to download both sphinxbase and pocketsphinx packages and unpack them. Please note that youcan not use sphinxbase and pocketsphinx of different version, please make sure that versions are in sync. After unpack you should see the following two main folders:

   sphinxbase-X.X
   pocketsphinx-X.x

On step one, build and install SphinxBase. Change current directory to sphinxbase folder. If you downloaded directly from the repository, you need to do this at least once to generate theconfigure file:

   %cd sphinxbase-5prealpha
  % ./autogen.sh

if you downloaded the release version, or ran autogen.sh at least once, then compile and install:

   % ./configure
   % make
   %sudo make install(加sudo才能不报错,不然权限不够)

The last step might require root permissions so it might be sudo make install. If you want to use fixed-point arithmetic, you must configure SphinxBase with the –enable-fixed option. You can also set installation prefix with–prefix. You can also configure with or without SWIG python support.

The sphinxbase will be installed in /usr/local/ folder by default. Not every system loads libraries from this folder automatically. To load them you need to configure the path to look for shared libaries. It can be done either in the file/etc/ld.so.conf or with exporting environment variables:

   export LD_LIBRARY_PATH=/usr/local/lib
   export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
   in new terminal.

For more details on linker configuration see Shared Libraries HOWTO.

Then change to pocketsphinx folder and perform the same steps

  % ./autogen.sh
% ./configure
% make
% sudo make install


sudo apt-get install ros-indigo-audio-common

To test installation, run'pocketsphinx_continuous -inmic yes' and check that it recognizes words you are saying to the microphone.

If you get an error such as:error while loading shared libraries: libpocketsphinx.so.3, you may want to check your linker configuration with LD_LIBRARY_PATH environment variable described above.

没遇见错误
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值