Friday, September 28, 2012

Easy read out loud in linux

1. Install espeak and xclip
2. Create the following script
vim /opt/myapps/

pidof espeak
if [[ $? == 0 ]]
   pkill -9 espeak
   TEXT=$( xclip -o | sed s/\"/\'/g )
   espeak -ven+f2 -s180 "$TEXT"

3. Add keyboard short-cut to the script  (eg: Ctrl+Shift+r)
4. To read any text, first copy the text (eg: Select and Press Ctrl+c) and the press Ctrl+Shift+r. This will read the text in the clipboard.

No comments:

Post a Comment