ubuntu12.04安装语音识别系统PocketSphinx

前端之家收集整理的这篇文章主要介绍了ubuntu12.04安装语音识别系统PocketSphinx前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

ROS安装教程:

http://wiki.ros.org/pocketsphinx

但是装了不知道怎么用。。


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
   

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

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.

没遇见错误

猜你在找的Ubuntu相关文章