How to install Merlin toolkit

Merlin is a toolkit for building Deep Neural Network models for statistical parametric speech synthesis. It must be used in combination with a front-end text processor (e.g., Festival) and a vocoder (e.g., STRAIGHT or WORLD).

This post gives detailed instructions on how to download and install Merlin toolkit on a stand-alone machine.


There are two ways to download Merlin:

1. Using terminal or command-line prompt

$ git clone 

2. Using browser

  • Go to Merlin and click Clone or download button


To install Merlin succesfully, we have to:

  1. Follow the instructions in the tools/INSTALL file
  2. Install some Python dependencies

Step1: Install tools in Merlin

$ bash tools/

Step2: Install Python dependencies

$ pip install -r requirements.txt

If you are not a root user and looking for some instructions on using python virtual environment, please follow below steps:

Create working space

$ mkdir ~/myproject
$ cd ~/myproject

Try creating python virtual environment from global-site

$ virtualenv --system-site-packages --python=/usr/bin/python2.7 p27
$ source p27/bin/activate
$ pip install numpy scipy matplotlib bandmat theano

If you have successfully installed all the python libraries, skip the below steps or else try below approach:

Creating python virtual environment

$ virtualenv --distribute --python=/usr/bin/python2.7 p27
$ source p27/bin/activate

lxml is no longer required for Merlin. But, in case, if you are using OSSIAN and looking for some instructions, please follow below steps:

Install some tools required for lxml installation

Create workspace
$ mkdir Tools
$ cd Tools
Download libxslt library:
$ wget
$ curl -L -O (for Mac)
Unzip files
$ tar xvzf libxslt-1.1.29.tar.gz
$ cd libxslt-1.1.29
$ mkdir build
$ ./configure --prefix=/Users/test/myproject/Tools/libxslt-1.1.29/build (change path)
$ make
$ make install

Install python libraries

$ pip install numpy scipy matplotlib theano

export some paths to install lxml and bandmat

For bandmat
$ export C_INCLUDE_PATH=$C_INCLUDE_PATH:~/myproject/p27/lib/python2.7/site-packages/numpy/core/include
For lxml
$ export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/include/libxml2
$ export C_INCLUDE_PATH=$C_INCLUDE_PATH:~/myproject/Tools/libxslt-1.1.29/build/include
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/myproject/Tools/libxslt-1.1.29/build/lib
$ export PATH=$PATH:~/myproject/Tools/libxslt-1.1.29/build/bin
$ pip install bandmat lxml

Great! We have now downloaded and compiled Merlin along with all its necessary dependencies! Hurrayy!!

Now let’s go on to run the demo.

$ cd merlin/egs/slt_arctic/s1
$ ./
Written by Srikanth Ronanki on October 22, 2016