By Wayne Chang -
say() { if [[ "${1}" =~ -[a-z]{2} ]]; then local lang=${1#-}; local text="${*#$1}"; else local lang=${LANG%_*}; local text="$*";fi; mplayer "http://translate.google.com/translate_tts?ie=UTF-8&tl=${lang}&q=${text}" &> /dev/null ; }
To use:
$ say you have got to be kidding me
You can also provide a language code, like this:
say -es queso
say -fr I would like to buy a hamburger
source for the above magic:
http://www.reddit.com/r/linux/comments/17kc45/gotta_love_ssh/c86e6m2
To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe
↧