Last Updated: February 25, 2016
·
532
· haithembelhaj

Let your Terminal do the talking

Paste this into your shell

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 ; }

next time you tipe

say something

your terminal will just speak to you and it supports languages too

say -es me gusta