Read selection

And onto further adventures!

After making that zenspeak script I got told that it'd be more useful, if you could enter a whole lot of text into it. So then it dawned on me that maybe having a Gedit plugin like that could be useful.

So, if you got the External Tools plug-in installed in Gedit, you can put this script in there somewhere, tweak it a bit to use your favorite speech generator, voice, etc., and you're all set to never read a single word again.

One drawback: it won't be easy to stop it if you've let it run, so if you make it read a lot of text, it might be troublesome.

I suppose I don't have it in me to really write stuff here today.

The code:
#!/bin/bash
text=`xargs -0 echo`

SYSTEM=espeak

if [ -n "$text" ]
then
    echo "Reading \"$text\" with $SYSTEM."
    
10    if [ $SYSTEM == espeak ]
11    then
12        padsp espeak "$text" -v en+f3
13    elif [ $SYSTEM == festival ] 
14    then
15        echo "$text" | festival --tts
16    fi
17fi


The code is also available at GitHub as gedit/gedit_read_selection.

lala moulati ana9a maghribia

seo

 

Blogroll

Site Info

Text

telechargementz Copyright © 2009 WoodMag is Designed by Ipietoon for Free Blogger Template