Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- [ -z "`which mplayer`" ] && echo "mplayer required" && exit
- function google_say() {
- mplayer -user-agent Mozilla "http://translate.google.com/translate_tts?tl=en&q=$(echo $* | sed 's#\ #+#g')" > /dev/null 2>&1
- }
- args="$*"
- if [ -z "$args" ]; then
- while :; do
- read args
- google_say "$args"
- done
- fi
- if [ ! -z "$args" ]; then
- google_say "$args"
- fi
Add Comment
Please, Sign In to add comment