6

In Windows I can do these steps:

1. Open Notepad
2. Copy and Paste 

CreateObject("SAPI.SpVoice").Speak"Hello."

3. Save it as xyz.vbs
4. Run it/Open it

It will then speak "Hello". Is there something like this in Ubuntu?

2

2 Answers 2

8

There is a link which will give detailed text to speech command line tools.

http://elinux.org/RPi_Text_to_Speech_%28Speech_Synthesis%29

The first speech package I tried was Festival. It worked fine and produces a voice like a rough sounding robot.

Festival Text to Speech

Install Festival with:

sudo apt-get install festival

Try out Festival with:

echo “Just what do you think you're doing, Dave?” | festival --tts

Espeak Text to Speech Espeak is a more modern speech synthesis package than Festival. It sounds clearer but does wail a little. If you are making an alien or a RPi witch then it’s the one for you! Seriously it is a good allrounder with great customisation options.

Install Espeak with:

sudo apt-get install espeak 

Test Espeak with: English female voice, emphasis on capitals (-k), speaking slowly (-s) using direct text:-

espeak -ven+f3 -k5 -s150 "I've just picked up a fault in the AE35 unit"
0
6

Install the espeak Install espeak package. Then run in a terminal

espeak -v en "Hello"

To change the voice, please refer to the manpage. An excerpt from man espeak:

   --voices[=<language code>]
          Lists  the available voices. If =<language code> is present then only
          those voices which are suitable for that language are listed.

   -v <voice name>
          Use voice file of this name from espeak-data/voices
3
  • Can I change the voice ?
    – Unbound
    Feb 11, 2014 at 9:24
  • @AvinashRaj Where is that requirement given in the question? And for this example he provided in Windows you'll need Visual Basic scripting and speech synthesis components installed.
    – gertvdijk
    Feb 11, 2014 at 9:28
  • 2
    Is there any option for female vooice?
    – Unbound
    Feb 11, 2014 at 9:38

Not the answer you're looking for? Browse other questions tagged .