Created
May 1, 2016 18:04
-
-
Save elmodos/eed636470473ad05b2fe10e4f26ae60f to your computer and use it in GitHub Desktop.
Linux, say current selection aloud, espeak
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get espeak PID if it is running | |
PID=`pgrep -x espeak` | |
echo Process ID: $PID | |
if [ -z $PID ]; | |
then | |
# Not runnning | |
# en - male | |
# en+12 - female | |
xclip -selection primary -out | espeak -v en+12 --stdin | |
else | |
# Is running, terminating | |
kill -9 $PID | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment