PDA

View Full Version : Installing Text To Speech on Linux tails (Festival with quite nice voice pack)



Fli
03-02-2014, 11:48 PM
Hi,

this tutorial is about installing text to speech system on linux Tails.

Install Festival:

sudo apt-get install festival festvox-kallpc16k

Test audio:

echo "Thank You for using Instant C-panel-Hosting-dot com" | festival --tts

It sounds like this: http://audiour.com/0uhynfbi

If you need slightly better voice, you can download around 100MB voice folder like this


sudo apt-get install festlex-cmu;cd /usr/share/festival/voices/english/
sudo wget -c http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_clb_arctic-0.95-release.tar.bz2
sudo tar jxf cmu_us_clb_arctic-0.95-release.tar.bz2
sudo ln -s cmu_us_clb_arctic cmu_us_clb_arctic_clunits
sudo cp /etc/festival.scm /etc/festival.scm.backup
sudo echo "(set! voice_default 'voice_cmu_us_clb_arctic_clunits)" >> /etc/festival.scm

That should download package and set it as default voice in festival.scm

and result sounds like this: http://audiour.com/m0dr4ppi

How to make audio file out of text:

echo "Thank You for using Instant C-panel-Hosting-dot com" | text2wave -o filename.wav
Can also convert to mp3, but using "lame" (apt-get install lame;man lame) or using "pacpl" (apt-get install pacpl; pacpl --to mp3 sourcefile.wav)

Another interesting male voice:
Previews: http://www.speech.cs.cmu.edu/cmu_arctic/cmu_us_bdl_arctic/wav/
DL: http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_bdl_arctic-0.95-release.tar.bz2

How to do it in Tails Linux

Tails is speciffic Live linux system which saves data only into RAM, so after restart all installed Apps are away. In tails would be handy to instal basic voice pack which is small, each time Tails start by some bash script. Or following is tutorial for 100MB pack if you really need it.

ONETIME JOB:

Download 100MB voices archive onetime into Persistent folder on your Tails Flash disk and extract it:

cd /home/amnesia/Persistent
sudo wget -c http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_clb_arctic-0.95-release.tar.bz2
sudo tar jxf cmu_us_clb_arctic-0.95-release.tar.bz2

remove tar.bz2 if extraction succeeded:

rm cmu_us_clb_arctic-0.95-release.tar.bz2

Assuming Festival is installed, edit its config file:

sudo vi /usr/share/festival/festival.scm

and add this to the last empty line:

(set! voice_default 'voice_cmu_us_clb_arctic_clunits)

save and copy this file into Persistent volume for future restore.

sudo cp /usr/share/festival/festival.scm /home/amnesia/Persistent

Then create bash script which you will launch on tails start and it will symlink the TTS folder from Persistent to the Festival voice directory and also copy and replace Festival scm file where you set 100MB voice pack as default.

REPEATED JOB ON EACH TAILS START

Running the bash script:


sudo ln -s /home/amnesia/Persistent/cmu_us_clb_arctic /usr/share/festival/voices/english/cmu_us_clb_arctic_clunits
sudo cp /home/amnesia/Persistent/festival.scm /usr/share/festival/festival.scm