Speech:Install

From Openitware
Jump to: navigation, search


System Description


Speech Software Installation Steps

Welcome to the Speech Recognition Capstone Project's Software Installation page. This project is a developing work in progress at the University of New Hampshire, Manchester. Students from the Computer Information Systems and Engineering Technology degree programs have been participating with this project for two years at the time of this documentation. This Software Installation Setup guide will assume a few basic concepts regarding the current state of the system on which the work is being done.

Firstly, the main objective of the project is to run "training" and "decoding" sessions on a network of computers located at UNHM. This network of servers can be accessed via SSH through Caesar. Caesar is the main distribution point server which also acts as the default gateway for all other servers on the network. Caesar has a shared directory (/mnt) which exists on all 8 other "batch queue" servers on its network. This guide will explain how to extract the programs and tools needed to perform speech recognition on Caesar's shared directory, under the assumption that these programs will be executed on individual batch queue machines.

It is important to know what is currently installed on the servers before following any particular part of this guide. This guide will detail instructions for installing Sphinx3 on Caesar, for example, which may or may not be necessary depending on the state of the current system. In short, all aspects of installation are covered here and it is important to know which portions apply to the system given the current setup.

The first thing you need to know is If the the main fileserver CAESAR's Operating System is not upgraded or being reinstalled. Please do not reinstall the Fileserver Installation software. This has all ready been done. For the Capstone Speech Project we have (1)fileserver(caesar) and (9)batch machines. Caesar is sharing a network drive called /mnt/main with the (9) batch machines. Only caesar is installed with the Sphinx Trainer, Decoder, Tool Kit, and Base software. The plan for this was to install the software on caesar and not on the (9)batch machines. That way we can test if the software installed on /mnt/main(a physical part of caesar) could be used by the (9)batch machines to run the Sphinx Software from their shared network drive (not physically on the (9)batch machines). This would be the first step of one day running the machines parallel with each other. Running the machines parallel with each other would be a great time saver for future projects. We made it possible to run our own separate mini trains on each server that the teams were given by using soft links from the batch machines physical /usr/local to caesar's shared network drive /mnt/main/local. These soft links only need to be created if the batch machine that is being used did not have the soft links previously created on them. You can see if your machine has a soft link created on it by cd /usr command and then using the ls -al command. If you see a -> pointing to /mnt/main/local every thing is ready to go.

Sphinx3 files thumb.png

The picture to the right will show you all of the files and location of those files that are affected by the Sphinx installation.

Fileserver Installation (caesar)

Sphinx 3 Decoder

Steps needed to install Sphinx 3 on Caesar (note: Sphinx 3 is CMU Speech Recognition software).

  1. First, browse to Sphinx Download Page. Here you will see an item called sphinx3-snapshot. This is the current version we are running on Caesar. Save this file to a convenient location.
  2. Assuming you are downloading this file from a browser in Windows, you will next need to perform a put with a sftp program to put it on the desired server. There is an excellent client application for Windows call psftp that can help accomplish this, it is a putty individual program.
  3. After downloading the psftp software, run the program and use the open caesar.unh.educommand. Use the the put <the location of the tar on the windows machine /mnt/main/root/install/tar command.
  4. Close the psftp program.
  5. Log into caesar with putty.
  6. Change directory with the cd /mnt/main/root/install/tar command.
  7. Once you have the tar file on the server, you need to extract it. Do so by using the tar -xvzf <tar file> -C /mnt/main/root/install/sphinx3 command.
  8. To Install Sphinx 3 you have to run the cd /mnt/main/root/install/sphinx3 command and run ./configure command followed by the make command.

Sphinx Train

To install the Sphinx train you need to run the commands in the order below.

  1. First, browse to Sphinx Download Page and find the Sphinx Train software.
  2. Assuming you are downloading this file from a browser in Windows, you will next need to perform a put with a sftp program to put it on the desired server. There is an excellent client application for Windows call psftp that can help accomplish this, it is a putty individual program.
  3. After downloading the psftp software, run the program and use the open caesar.unh.educommand. Use the the put <the location of the tar on the windows machine /mnt/main/root/install/tar command.
  4. Close the psftp program.
  5. Log into caesar with putty
  6. Be sure you have a copy of SphinxTrain-1.0 in /mnt/main/root/tools, if not you will have to download and extract it there.
  7. Change directory with this command cd /mnt/main/root/tools/SphinxTrain-1.0
  8. To unpack-aged a tar file use the tar -xvzf <tar file> -C /mnt/main/root/install/sphinx3 command.
  9. Once you have unpack-aged the Sphinx Train Tar files, you need to run the command ./configure...this command will run the POSIX shell script in the Sphinx Train directory.
  10. You then need to run the make command the will run the MakeFile which will put together the configuration files for the Sphinx Train.

CMU Cam Toolkit

To install CMU Cam Toolkit you need to run the commands in the order below.

  1. First, browse to Sphinx Download Page and find the CMU Cam Toolkit software.
  2. Assuming you are downloading this file from a browser in Windows, you will next need to perform a put with a sftp program to put it on the desired server. There is an excellent client application for Windows call psftp that can help accomplish this, it is a putty individual program.
  3. After downloading the psftp software, run the program and use the open caesar.unh.educommand. Use the the put <the location of the tar on the windows machine /mnt/main/root/install/tar command.
  4. Close the psftp program.
  5. Log into caesar with putty
  6. Be sure you have a copy of CMU-Cam_toolkit_v2 in /mnt/main/root/tools, if not you will have to download and extract it there.
  7. To unpack-aged a tar file use the tar -xvzf <tar file> -C /mnt/main/root/install/sphinx3 command.
  8. Change directory with this command cd /mnt/main/root/tools/CMU-Cam_Toolkit_v2.
  9. You then need to change directory with cd src.
  10. Then run the command make install which will run the install-sh shell script that lives in the src directory. By running the make install command all of the executable files will be copied to the bin directory and the library file SLM2.a will be copied to the lib directory automatically.

Sphinx Base

To install the Sphinx base you need to run the commands in the order below.

  1. First, browse to Sphinx Download Page and find the Sphinx Base software.
  2. Assuming you are downloading this file from a browser in Windows, you will next need to perform a put with a sftp program to put it on the desired server. There is an excellent client application for Windows call psftp that can help accomplish this, it is a putty individual program.
  3. After downloading the psftp software, run the program and use the open caesar.unh.educommand. Use the the put <the location of the tar on the windows machine /mnt/main/root/install/tar command.
  4. Close the psftp program.
  5. Log into caesar with putty
  6. Be sure you have a copy of sphinxbase-0.6.1 in /mnt/main/root, if not you will have to download and extract it there.
  7. To unpack-aged a tar file use the tar -xvzf <tar file> -C /mnt/main/root/install/sphinx3 command.
  8. Change Directory with the cd /mnt/main/root/sphinxbase-0.6.1 command.
  9. Once in the directory run the command ./configure. This will configure the system for the install.
  10. Then run the command make. This will compile the install package.
  11. You can run the command make check. This will test on the make command.
  12. You then need to run the command make install. Warning this command can only be run by root.
  13. You can run the command make installcheck to test the install.

Batch Queue Machine Installation (asterix, obelix, ...)

Create Soft links

You need to create a soft link to /mnt/main/local on all of the batch machines (i.e. the machines that are not the Fileserver, caesar). This will make it possible to run the speech software from any machines.

  1. You need to log into caesar as root.
  2. You then SSH into one of the other servers. You can find their names by using the cat /etc/hosts command.
  3. Once you have decide which server you are going to SSH into, use the ssh <server name> command.
  4. Once you put the root password in. You need to change directories to /usr with the cd /usr command.
  5. Once in the /usr directory. Use the ls -al command to see is there is already a soft link on the local directory.
  6. If there is no link pointing to /mnt/main/local you need to create a link.
  7. Follow the instructions to create a soft link on one of the batch machines.
  8. You first need to run the mv -i local local-OLD command. Be very careful using this command as root, the -i makes the command interactive.
  9. Then run the ln -s /mnt/main/local local command.
  10. You can run the ls -al command and see if the directory local is pointing to /mnt/main/local.
  11. Use the cd /usr/local/bin command to go to the bin directory in the usr/local directory and the use the ls command to see if the files are in bin.
  12. Just type the name of one of the files and see if it runs.
  13. If the executable file in /usr/local/bin does not work, use the ldconfig command to load the newest configuration of the system.

ldconfig

Note: if you are running the installation for the first time you need to run the following command to load the current configuration of the system for the install to work:

  • ldconfig

ldconfig is used to configure dynamic linker run-time bindings on the linux machine. ldconfig will create the proper links to the most recent shared libraries found in the directories you specified on the command line and in the /etc/id.so.config file and the /usr/lib and /lib directories found on the local machine you are using. ldconfig stores this information in cache for the use by the run-time linker, ld.so.

"ldconfig checks the header and file names of the libraries it encounters when determining which versions should have their links updated. ldconfig ignores symbolic links when scanning for libraries." - Source - ldconfig - Linux Command This is why you need to run the ldconfig after you install the software on Caesar.