Sie sind auf Seite 1von 2

TEXT TO SPEECH Conversion

1. Install the package festival by running this command on terminal


# apt-get install festival
2. Create any text file named source.txt using
# vi source.txt (add the text here to convert into .wav file
Save text file using esc:wq
3. Create a .wav file which will play the contents of the file using a command
# text2wave source.txt –o output.wav
This will convert the text file to audio file with default voice.

Now to try out with the different voices use the following procedure
Search for the different voices present
# apt-cache search festvox-*
It will display the list of different voices available, some voices are availablein 16k and 8k both.
The clearity of 16k is better than 8k, so prefer 16k voices.
# apt-get install festvox-don
# apt-get install festvox-rablpc16k
# apt-get install festvox-kallpc16k
# apt-get install festvox-kdlpc16k
Installing enhanced MBROLA voices
Download the voices from
# wget http://tcts.fpms.ac.be/synthesis/mbrola/bin/pclinux/mbrola3.0.1h_i386.deb
# wget –c http://tcts.fpms.ac.be/synthesis/mbrola/dba/us1/us1-980512.zip
# wget –c http://tcts.fpms.ac.be/synthesis/mbrola/dba/us2/us2-980812.zip
# wget –c http://tcts.fpms.ac.be/synthesis/mbrola/dba/us3/us3-990208.zip
# wget –c http://www.festvox.org/packed/festival/latest/festvox_us1.tar.gz
# wget –c http://www.festvox.org/packed/festival/latest/festvox_us2.tar.gz
# wget –c http://www.festvox.org/packed/festival/latest/festvox_us3.tar.gz

Unpackage the contents by


# dpkg –I mbrola3.0.1h_i386.deb
Unzip the downloaded contents using
# unzip –x us1-980512.zip
# unzip –x us2-980812.zip
# unzip –x us3-990208.zip
# tar xfv festvox_us1.tar.gz
# tar xfv festvox_us2.tar.gz
# tar xfv festvox_us3.tar.gz

Create directories using


# mkdir /usr/share/festival/voices/English/us1_mbrola
# mkdir /usr/share/festival/voices/English/us1_mbrola
# mkdir /usr/share/festival/voices/English/us1_mbrola

Copy these untarred (unzipped) files to the


# mv us1 /usr/share/festival/voices/english/us1_mbrola/
# mv us2 /usr/share/festival/voices/english/us2_mbrola/
# mv us3 /usr/share/festival/voices/english/us3_mbrola/
# mv festival/lib/voices/english/us1_mbrola/* /usr/share/festival/voices/english/us1_mbrola/
# mv festival/lib/voices/english/us2_mbrola/* /usr/share/festival/voices/english/us2_mbrola/
# mv festival/lib/voices/english/us3_mbrola/* /usr/share/festival/voices/english/us3_mbrola/

Testing the festival on different voices


# festival (command used for festival prompt)
# festival>(voice.list)
To select a default voice
# festival> (set! Voice_default ‘voice_nitech_us_rms_arctic_hts)
Replace the voices with the other voices types.

Das könnte Ihnen auch gefallen