Installation and compilation of the Kaldi Speech Recognition library in Linux

Source: Internet
Author: User
Tags svn update gfortran

1. Introduction

The Kaldi speech recognition tool organizes a collection of various commands and functions of HTK and calls them using perl scripts. At the same time, the deep neural network classifier (DNN) is also added, which is made by the former HTK developer. It can be said that it is an enhanced version of HTK.

Kaldi official website see: http://kaldi.sourceforge.net/index.html

2. Install and compile

Step 1: Download The kaldi Toolkit

Kaldi has two versions, kaldi-1 and kaldi-trunk, the former is the stable version, the latter is the new version. I installed the new version.

Start installation below:

Sudo apt-get install subversion
Svn update
Svn co https://kaldi.svn.sourceforge.net/svnroot/kaldi/trunk kaldi-trunk
Cd kaldi-trunk
Cd tools
Cat INSTALL
Make-j 4

Note:

1. When the computer has more than one cpu, if there are four, you can enter make-j 4 to save time.

2. The make command is used to install 8 software. Among them, (sph2pipe, openfst, ATLAS) are required.

Step 2: Configure

Cd ../src
./Configure

Note: An error is usually reported at this time because openfst or ATLAS is not installed.

Install openfst:

1. Install g ++

Sudo apt-get install g ++

2. Extract

Tar-xovzf openfst-1.3.2.tar.gz
For dir in openfst-1.3.2/{src/,} include/fst; do
([-D $ dir] & cd $ dir & patch-p0-N <.../openfst. patch)
Done
Rm openfst 2>/dev/null # Remove any existing link
Ln-s openfst-1.3.2 openfst
Cd openfst-1.3.2

Select the correct configuration command as follows:

For linux or darwin,

./Configure -- prefix = 'pwd' -- enable-static -- disable-shared

For a 64-bit system,

./Configure -- host = x86_64-linux -- prefix = 'pwd' -- enable-static -- disable-shared

If it is a virtual machine,

./Configure -- prefix = 'pwd' cxx0000g000000000000-4.exe cc0000gcc-4.exe -- enable-static -- disable-shared

3. Install

Sudo make install

Install ATLAS:

Note: before installing ATLAS, ensure that the cpu throttling is disabled. By default, cpu throttling in power management is enabled for most operating systems to protect the cpu. Most computers can turn off cpu throttling in BIOS (usually in power management or cpu frequency options .) Cpu throttling can also be disabled in most operating systems. In Fedora, you can disable cpu throttling by inputting/usr/bin/cpufreq-selector-g performance. The path of the cpu frequency scaling governor in Ubuntu 12.04 is/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ). Recommended here: https://wiki.archlinux.org/index.php/CPU_Frequency_Scaling_ (Simplified Chinese) modification software, after modification is temporary, restore the default settings after restart, this will not affect the basic settings.

Specific operations:

Sudo apt-get install cpufrequtils
Sudo cpufreq-set-c 1-g performance
Sudo cpufreq-set-c 2-g performance
Sudo cpufreq-set-c 3-g performance
Sudo cpufreq-set-c 4-g performance
Cat/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Cat/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
Cat/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
Cat/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

Check whether the ondemand option is changed to performance.

In addition to changing the cpu throttling, gfortran is also installed; otherwise, an error occurs:

Sudo apt-get install gfortran

Finally, enter:

./Install_atlas.sh

Complete the installation of ATLAS.

Step 3: Configure and install:

../Src

./Configure

Make depend

Make-j 4 will prompt after a period of time, showing that the installation is successful.

Install and compile the HTK Speech Recognition library in Linux

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.