Thursday, 27 June 2013

Install flite (festival lite) text to speech system in linux

Flite is text to speech engine for linux. It is based on festival speech synthesis system. Most of the linux sytems comes with flite in its package manager. It's just a apt-get on debian based or yum install in rpm based systems.

For example, you can install it on centos with below command:


yum install flite-devel

If it is not available in your system, you can compile and install it.

1.   Download Flite 1.3

wget http://www.speech.cs.cmu.edu/flite/packed/flite-1.3/flite-1.3-release.tar.gz

2.   Download patch to enable Flite 1.3 to build shared libraries and save it in the same directory as flite-1.3-release.tar.gz


wget http://asterisk-flite.sourceforge.net/extras/flite-1.3-sharedlibs.patch

  3.  Download patch to enable ALSA support for Flite 1.3 and save it in the same directory as the previous patch file

wget http://asterisk-flite.sourceforge.net/extras/flite-1.3-alsa_support.patch

 4.   In a terminal, go to the directory where the files were saved

     Extract flite:

    tar -xzvf flite-1.3-release.tar.gz

  5. Change to the extracted flite directory:

    cd flite-1.3-release

  6.  Apply the patches:

    patch -p1 < ../flite-1.3-sharedlibs.patch

    patch -p1 < ../flite-1.3-alsa_support.patch


   7.  Apply the patches:

    patch -p1 < ../flite-1.3-sharedlibs.patch

    patch -p1 < ../flite-1.3-alsa_support.patch


   8. Configure & compile flite:

    ./configure --enable-shared --with-audio=alsa

    make

   9. Install flite to the system:

    su -c 'make install'

















Reference: http://asterisk-flite.sourceforge.net/

1 comment:

  1. I cant build it, i keep getting these errors..


    Installing
    mkdir -p /usr/local/bin
    mkdir -p /usr/local/lib
    mkdir -p /usr/local/include/flite
    /usr/bin/install -c -m 644 include/*.h /usr/local/include/flite
    tar: libflite.so: Cannot stat: No such file or directory
    tar: libflite_cmulex.so: Cannot stat: No such file or directory
    tar: libflite_usenglish.so: Cannot stat: No such file or directory
    tar: libflite_cmu_us_kal.so: Cannot stat: No such file or directory
    tar: libflite_cmu_us_kal16.so: Cannot stat: No such file or directory
    tar: libflite_cmu_time_awb.so: Cannot stat: No such file or directory
    tar: libflite.so.1.3: Cannot stat: No such file or directory
    tar: libflite_cmulex.so.1.3: Cannot stat: No such file or directory
    tar: libflite_usenglish.so.1.3: Cannot stat: No such file or directory
    tar: libflite_cmu_us_kal.so.1.3: Cannot stat: No such file or directory
    tar: libflite_cmu_us_kal16.so.1.3: Cannot stat: No such file or directory
    tar: libflite_cmu_time_awb.so.1.3: Cannot stat: No such file or directory
    tar: libflite.so.1: Cannot stat: No such file or directory
    tar: libflite_cmulex.so.1: Cannot stat: No such file or directory
    tar: libflite_usenglish.so.1: Cannot stat: No such file or directory
    tar: libflite_cmu_us_kal.so.1: Cannot stat: No such file or directory
    tar: libflite_cmu_us_kal16.so.1: Cannot stat: No such file or directory
    tar: libflite_cmu_time_awb.so.1: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    /usr/bin/install -c -m 755 bin/flite /usr/local/bin
    /usr/bin/install: cannot stat `bin/flite': No such file or directory
    make: *** [install] Error 1

    ReplyDelete