Installing Latest CMUSphinx in Ubuntu18.04
Installing Latest CMUSphinx in Ubuntu18.04
Help Taken from this tutorial. In addition I am adding screenshots. I am making this for my students who are beginners or Ubuntu and CMUSphinx. I will make it as simple as possible.
If you are still having difficulties feel free to comment
- First we need dependencies, Run this command in Terminal to install the dependencies.
sudo apt-get install gcc automake autoconf libtool bison swig python-dev libpulse-dev
If you already have installed some of them, you may skip them from command.
Installing CMU-SPHINX
We have to install sphinxbase first
For that purpose I will create directories witk mkdir
command which is used to create a directory.
Speech/CMUSphinx
CMUSphinx will be parent directory which will hold sphinxbase,sphinxtrain and pocketsphinx directories.
Now we need to clone it from GitHub for that purpose we require git.
To check if you already have git or not. Type
git --version
If it is not installed install it with
sudo apt-get install git
I already have git installed so I am cloning directly.
In other words we are downloading sphinxbase from github. If you are having problem with this step you may manually download and extracts it in your OS.
Clone Complete
GUI View
When clone completed it means we have downloaded it. we may see it in GUI view.
- type
./autogen.sh
and press enter. - After its completion type
make
and press enter. - After its completion type
sudo make install
and press enter.
As shown in screenshots below
./autogen.sh
make
sudo make install
After this process Sphinx Source is installed but it have some error as shown in picture below.
you may type sphinx_lm_convert
and check on your own.
Open file named ld.so.conf
located in root/etc
full path is /etc/ld.so.conf
by default it will be like below picture.
Note: You will need super user permissions to open these folder and file
add /usr/local/lib to the file and save it. As picture below.
Run the sudo ldconfig
and check again with sphinx_lm_convert
If you get screen look like above picture. Problem solved...
You have installed Sphinxbase. Now next step is to install pocketsphinx. We will clone it from github as we did sphinxbase. Go into folder where you want to download it and run the command.
After completion of this step here is the screenshot below.
First change your working directory with cd pocketsphinx
- now its time to run the command
./autogen.sh
as shown in picture below. so type the command and press enter. - After completion of this process run
make
command. - Type
make
and press enter. - When make will complete then run
sudo make install
- After these three steps pocketsphinx is installed.
Pictures are shown below.
Pocketsphinx is installed till this step. Now lets install Sphinxtrain
First step is to clone it for github as we already cloned others.
so type the command git clone https://github.com/cmusphinx/sphinxtrain.git
and press enter.
After the completion of this step.
- go to sphinxtrain directory via
cd sphinxtrain
- type
./autogen.sh
and press enter - type
make
and press enter. - type
sudo make install
and press enter - Here you go you have installed Sphinxtrain.
If you followed all above instruction by now you have installed CMUSphinx for training and testing of speech data.