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

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

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.

没遇见错误

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...