Christophe Nowicki

August 11, 2009

xPL Text-to-Speech module

I’ve wote an Text-to-Speech module for xPL Perl based on eSpeak and the Speech::eSpeak Perl module.

The xPL TTS.BAISC schema is very basic, but suffisent for my text-to-speech needs.

Setup on Debian GNU/Linux

You should install the fallowing packages with apt :
# apt-get install libespeak-dev dh-make-perl espeak-data devscripts

And build the Perl module :
# cd /usr/src
# wget http://search.cpan.org/CPAN/authors/id/H/HG/HGNENG/Speech-eSpeak-0.3.tar.gz
# tar xzf Speech-eSpeak-0.3.tar.gz
# dh-make-perl Speech-eSpeak-0.3
# cd Speech-eSpeak-0.3
# debuild
# dpkg -i dpkg -i ../libspeech-espeak-perl*

Get my source code :
# wget http://www.csquad.org/wp-content/contrib/eSpeak.pm -O /usr/share/perl5/xPL/Dock/eSpeak.pm
# wget http://www.csquad.org/wp-content/contrib/xpl-tts -O /usr/bin/xpl-tts
# chmod +x /usr/bin/xpl-tts

Usage exemples

Launch the xpl-tts program :
$ xpl-tts -espeak-verbose -espeak-voice-language en -espeak-voice-gender 2 -espeak-voice-age 42
Then, send an xpl command on the network :
$ xpl-sender -m xpl-cmnd -c tts.basic speech="xPL rocks everything"

You should hear the synthesized voice.

And Voila ;-)

Bugs and evolutions

I will submit this module to the xpl-perl project and try to implement MBROLA project support. Because I’ve got a more humain voices.

Filed under: Home automation — Tags:, , , — cscm @ 17:17

Comments are closed.

Powered by WordPress