Skip to content

Instantly share code, notes, and snippets.

@miloh
Created August 8, 2015 07:41
Show Gist options
  • Save miloh/de9df9ebbdae5ac9916d to your computer and use it in GitHub Desktop.
Save miloh/de9df9ebbdae5ac9916d to your computer and use it in GitHub Desktop.
#!/bin/bash
#set -x
phrase=$1
if [ ! $2 ]
then
language="en"
else
language=$2
fi
say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?tl=$language&q=$phrase"; }
say $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment