If it is not explicitly told in following recipe, setting up services are described for Ubuntu 16.04 server, but applications are described for Ubuntu 16.04 and/or Lubuntu 16.04 workstation. If you use different Ubuntu version or Linux distribution, settings as well as content, names and places of configuration files may be different!
Got it.

HMM-based Speech Synthesis System (HTS)

See also:  HTS Engine

The Hidden Markov Model Toolkit (HTK) is a portable toolkit for building and manipulating hidden Markov models. HTK tools are open sourced with specific license. HTS tools adds patches and customizes HTK for speech synthesis.

This page describes, how to set up necessary tools on 64-bit Ubuntu 16.04 server or workstation. General setup of standard Ubuntu server is described here (in Latvian).

Content

Intro for terminal and command execution

If you are not sure how to execute described commands, look at Command line terminal.

Server setup

  1. If tools are set up on server, some environment settings could be neccessary to set, (e.g. default locale with  UTF-8 encoding and timezone). To set up these, enter commands, e.g.:

    sudo locale-gen "en_US.UTF-8"
    sudo dpkg-reconfigure locales
    sudo dpkg-reconfigure tzdata

    where en_US.UTF-8 is necessary UTF-8 enabled locale, and proceed with setup wizards.

  2. Install additionally needed packages:

    sudo apt-get install csh gcc g++ g++-multilib make libncurses5-dev libx11-dev clang byacc flex bc

Download packages

In general tools can be downloaded, extracted in any place, but there are few configuration setting, where fixed path is necessary. This guide assumes all tools are set in /home/HTS folder.
  1. Create /home/HTS folder and add access permissions to all registered users to it:

    sudo mkdir /home/HTS
    sudo chmod 777 /home/HTS
    cd /home/HTS
  2. Download necessary packages using wget, by executing following commands:

    wget http://festvox.org/packed/festival/2.4/speech_tools-2.4-release.tar.gz
    wget http://festvox.org/packed/festival/2.4/festival-2.4-release.tar.gz
    wget http://festvox.org/festvox-2.7/festvox-2.7.0-release.tar.gz

    wget --user=$WUSER --password=$WPASS http://htk.eng.cam.ac.uk/ftp/software/HTK-3.4.1.tar.gz
    wget --user=$WUSER --password=$WPASS http://htk.eng.cam.ac.uk/ftp/software/hdecode/HDecode-3.4.1.tar.gz

    wget http://hts.sp.nitech.ac.jp/archives/2.3/HTS-2.3_for_HTK-3.4.1.tar.bz2
    wget http://downloads.sourceforge.net/sp-tk/SPTK-3.11.tar.gz
    wget https://downloads.sourceforge.net/project/hts-engine/hts_engine%20API/hts_engine_API-1.10/hts_engine_API-1.10.tar.gz
    wget http://www.datastat.com/sysadminjournal/downloads/ActiveTcl8.4.5.0-linux-ix86-83070.tar.gz

    wget http://hts.sp.nitech.ac.jp/archives/2.3/HTS-demo_CMU-ARCTIC-SLT.tar.bz2

    where $WUSER and $WPASS are actual username and password received from HTK Registration form

Don't try to download the latest versions of the tools!
Use precise versions of packages from this guide, because one tool can't be set up and executed with arbitrary version of another tool!

Compile and set up tools

  1. Compile speech_tools:

    tar xvf speech_tools-2.4-release.tar.gz
    cd speech_tools/
    ./configure
    make
    cd ..
  2. Compile festival:

    tar xvf festival-2.4-release.tar.gz
    cd festival/
    ./configure
    make
    cd ..
  3. Compile festvox:

    tar xvf festvox-2.7.0-release.tar.gz
    cd festvox/
    ./configure
    make
    cd ..
  4. Extract, patch and compile HTK tools:

    tar xvf HTK-3.4.1.tar.gz
    tar xvf HDecode-3.4.1.tar.gz
    mkdir hts_patch
    mv HTS-2.3_for_HTK-3.4.1.tar.bz2 hts_patch/
    cd hts_patch/
    tar xvf HTS-2.3_for_HTK-3.4.1.tar.bz2
    cd ../htk/
    patch -p1 -d . < ../hts_patch/HTS-2.3_for_HTK-3.4.1.patch
    ./configure
    make
    sudo make install
    1. If something like following error occurs:

      esignal.c: In function 'WriteHeader': esignal.c:1184:25: error: 'ARCH'
      ...
      undeclared (first use in this function) architecture = ARCH;
    2. Add additional parameter to configure and complete compilation and installation:

      ./configure CFLAGS="-DARCH=linux"
      and compile and install HTK again.

  5. Make and install hlmtools and hdecode:

    make hlmtools; sudo make install-hlmtools
    make hdecode; sudo make install-hdecode
    cd ..
    1. If compilation error occurs:

      Makefile:77: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.
    2. Open file HLMTools/Makefile and replace leading 8 spaces with tab in following line:

      ...
      mkinstalldir:
      if [ ! -d $(bindir) -a X_@TRADHTK@ = X_yes ] ; then mkdir -p $(bindir) ; fi
      ...
      and compile and install hlmtools again.
  6. Extract, compile and install HTS engine:

    tar xvf hts_engine_API-1.10.tar.gz
    cd hts_engine_API-1.10/
    ./configure
    make
    sudo make install
    cd ..
  7. Extract, compile and install SPTK tools:

    tar xvf SPTK-3.11.tar.gz
    cd SPTK-3.11/
    ./configure
    make
    sudo make install
    cd ..
  8. Extract and install ActiveTcl (this package is probably unnecessary for latest versions of HTK):

    tar xvf ActiveTcl8.4.5.0-linux-ix86-83070.tar.gz
    cd ActiveTcl8.4.5.0-linux-ix86/
    sudo ./install.sh

    and follow setup wizard instructions.

  9. Go back to HTS folder:

    cd ..

Set up HTS demo project

  1. Extract and configure HTS demo project:

    tar xvf HTS-demo_CMU-ARCTIC-SLT.tar.bz2
    cd HTS-demo_CMU-ARCTIC-SLT/
  2. Configure project:

    ./configure   \
    --with-tcl-search-path=/usr/local/ActiveTcl/bin \
    --with-fest-search-path=/home/HTS/festival/examples \
    --with-sptk-search-path=/usr/local/SPTK/bin \
    --with-hts-search-path=/usr/local/HTS-2.3/bin \
    --with-hts-engine-search-path=/usr/local/bin

    where /home/HTS is folder of all installed tools.

  3. Make demo project:

    make
  4. Run Training.pl script in background with output redirected to log file:

    /usr/bin/perl scripts/Training.pl scripts/Config.pm > log 2>&1 &

    or, if you run it on workstation, make it low priority task with command:

    nice -n20 /usr/bin/perl scripts/Training.pl scripts/Config.pm > log 2>&1 &
  5. Look at the progress on log file with the command:

    tail -f log

See also:  HTS Engine

 

Created by Valdis Vītoliņš on 2018-01-02 18:44
Last modified by Valdis Vītoliņš on 2018-01-17 15:43
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License