Friday 23 March 2012

Installing CMU Sphinx in Ubuntu 11.10

It took me 2 installation to install CMU Sphinx successfully. But finally now it is working. Actually I also don't know how to install it but the internet helped me out. So the very first thing that you should do to download latest sphinxbase and pocketsphinx from their website.
http://cmusphinx.sourceforge.net/wiki/download/

After downloading the packages Its time for you to download dependencies. Here is the list of packages that I had to install to make it working. Screenshot of my Ubuntu Software Center.


Install all the packages that I have installed today in the screenshot. After installing all the packages now you can extract sphinxbase compressed file and open the directory and open the sphinxbase directory through the terminal and run the following commands which are normally executed to build a packages manually.
./configure
sudo make
sudo make install
Now unpack the pocketsphinx file and enter extracted directory of pocketsphinx using terminal using the cd command. and the above commands again
./configure
sudo make
sudo make install

After executing these command you can also execute this command to clean up all the mess created.
sudo make clean


NOTE: While executing ./configure focus on the output, It still there is any dependencies left to be installed, the configure script will issue an error something like that this package is missing. Install that package and then try again running the ./configure command.
Best of luck
Happy Coding.!! :)

Edit: List of packages so that you can copy and paste

libdpkg-perl
fakeroot
debhelper
libalgorithm-merge-perl
libgstreamer-plugins-base0.10-dev
libalgorithm-diff-xs-perl
po-debconf
libgstreamer0.10-dev
intltool-debian
gir1.2-gst-plugins-base-0.10
build-essential
dpkg-dev
html2text
patch
libalgorithm-diff-perl
pocketsphinx-hmm-wsj1
libpocketsphinx1
libsphinxbase1
pocketsphinx-utils
pocketsphinx-lm-wsj
gstreamer0.10-pocketsphinx
gir1.2-gstreamer-0.10
libqtgstreamer-0.10-0
libglib2.0-dev
zlib1g-dev
libqtglib-2.0-0
libtool
libltdl-dev
autoconf
automake
autotools-dev
bison
m4

7 comments:

  1. Thanks a lot for the info...it is really helpful for a beginner

    ReplyDelete
  2. I'm having problems while running POCKETSPHINX_CONTINOUS, the following error occurs:

    Audio ioctl(SYNC) failed: Inappropriate ioctl for device FATAL_ERROR: "continuous.c", line 242: Failed top open audio device

    ReplyDelete
  3. I am sorry but this is beyond me. You can take help from other forums. :)

    ReplyDelete
  4. i am unable to install the following 5 from the above packages.

    1.ibgstreamer-plugins-base0.10-dev
    2.libgstreamer0.10-dev
    3.pocketsphinx1 error: not available
    4.libglib2.0-dev
    5.autorools-dev error:not available

    when i run pocketsphinx_continuous i get the following error:

    ad_oss.c(103): Failed to open audio device(/dev/dsp): No such file or directory
    FATAL_ERROR: "continuous.c", line 246: Failed to open audio device

    i am using ubuntu 12.04

    ReplyDelete
    Replies
    1. Can you explain your problem a little more? What error do you get while you try to install these packages?

      Delete
    2. 1. Its not ibgstreamer-plugins-base0.10-dev . Its is libgstreamer-plugins-base0.10-dev. I hope this was just a typo error. Try running this command

      $ sudo apt-get install libgstreamer-plugins-base0.10-dev

      I am using Ubuntu 12.10. This command works fine for me.

      2. Package name is fine for this one. Can I know more about your error? Because this command works fine on my machine.

      sudo apt-get install libgstreamer0.10-dev

      3. Sorry for this one. My bad and thanks for pointing it out. Try using this command instead

      sudo apt-get install libpocketsphinx1

      4. Also didn't get your error for this one. The following command works fine for me. :)

      sudo apt-get install libglib2.0-dev

      5. Typo error. My bad. Thanks again. Try executing the following command.

      sudo apt-get install autotools-dev C

      Delete