Wednesday, December 10, 2014

Text to speech applications for linux -- tts engine

The following 3 applications, festival, pico2wave and picotts, we can just one among them to do the text-to-speech in English, Russian, Spanish, etc. 

1- festival install and using

root@tts:/# apt-get install festival
root@tts:/# echo "say it this testing text" | festival --tts

2- libttspico-utils, install and using,  text-to-speech engine from Google's Android

root@tts:/# apt-get install libttspico-utils
root@tts:/# pico2wave -w out.wav "say it this testing text" && aplay out.wav

3- picotts nodejs package install and using,  text-to-speech engine from Google's Android

root@tts:/# npm install picotts

- test create a file call mytts.js with the folloing content

#!/usr/bin/nodejs
var pico = require('picotts')
datain = process.argv[2];
pico.say(datain, 'en-US', function(err) {
          if (!err)
              console.log('Correctly played')
})

- to use it:
root@tts:/# ./mytts.js "say it this testing text"

or read from file test

root@tts:/# ./mytts.js "`cat test`"



No comments:

Post a Comment