Learn to pronounce using Festival

Publication date
03/15/2007
Categories
, ,
  1. Install Festival.

    $ sudo apt-get install festival

    (this command is for Debian based Linuxes)

  2. Create an easy to use script (at /usr/local/bin/pronounce, for example) to do the pronunciations.

    #!/bin/bash
    
    TEXT=`cat /dev/stdin`
    SPEED="${1:-2}"
    echo "(Parameter.set 'Duration_Stretch $SPEED)(SayText \"$TEXT\")" | festival

    Don't forget to chmod +x it!

  3. Use it!

    $ echo My tailor is rich | pronounce

    It has an optional argument that controls the pronunciation speed (by default is 2). For example,

    $ echo "Dearest creature in creation
    Studying English pronunciation,
    I will teach you in my verse
    Sounds like corpse, corps, horse and worse." | pronounce 4

    will pronounce it four times slower than the normal speed.

Comment this post

Fields marked with * are required.

*
It won't be made public. If you have a gravatar it will be displayed.
*