Skip to content

Instantly share code, notes, and snippets.

@dblotsky
Created January 12, 2013 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dblotsky/4520556 to your computer and use it in GitHub Desktop.
Save dblotsky/4520556 to your computer and use it in GitHub Desktop.
Apple "say" command saying things in different voices.
#! /bin/bash
usage() {
echo "Usage: $0 [phrase | \"default\"]"
exit 1
}
run() {
local phrase=$@
if [ "$phrase" == "default" ]; then
impersonate "Agnes" "Hello, my name is Agnes. Isn't it nice to have a computer that will talk to you?"
impersonate "Albert" "Hello, my name is Albert. I have a frog in my throat. No, I mean a real frog!"
impersonate "Alex" "Hello, my name is Alex. Most people recognize me by my voice."
impersonate "Bad News" "Hello, my name is Bad News. The light you see at the end of the tunnel is the headlamp of a fast approaching train."
impersonate "Bahh" "Hello, my name is Bahh. Do not pull the wool over my eyes."
impersonate "Bells" "Hello, my name is Bells. Time flies when you are having fun."
impersonate "Boing" "Hello, my name is Boing. Spring has sprung, fall has fell, winter's here and it's colder than usual."
impersonate "Bruce" "Hello, my name is Bruce. I sure like being inside this fancy computer."
impersonate "Bubbles" "Hello, my name is Bubbles. Pull the plug! I'm drowning!"
impersonate "Cellos" "Hello, my name is Cellos. Doo da doo da dum dee dee doodly doo dum dum dum doo da doo da doo da doo da doo da doo da doo."
impersonate "Deranged" "Hello, my name is Deranged. I need to go on a really long vacation."
impersonate "Fred" "Hello, my name is Fred. I sure like being inside this fancy computer."
impersonate "Good News" "Hello, my name is Good News. Congratulations you just won the sweepstakes and you don't have to pay income tax again."
impersonate "Hysterical" "Hello, my name is Hysterical. Please stop tickling me!"
impersonate "Junior" "Hello, my name is Junior. My favorite food is pizza."
impersonate "Kathy" "Hello, my name is Kathy. Isn't it nice to have a computer that will talk to you?"
impersonate "Pipe Organ" "Hello, my name is Pipe Organ. We must rejoice in this morbid voice."
impersonate "Princess" "Hello, my name is Princess. When I grow up I'm going to be a scientist."
impersonate "Ralph" "Hello, my name is Ralph. The sum of the squares of the legs of a right triangle is equal to the square of the hypotenuse."
impersonate "Trinoids" "Hello, my name is Trinoids. We cannot communicate with these carbon units."
impersonate "Vicki" "Hello, my name is Vicki. Isn't it nice to have a computer that will talk to you?"
impersonate "Victoria" "Hello, my name is Victoria. Isn't it nice to have a computer that will talk to you?"
impersonate "Whisper" "Hello, my name is Whisper. Pssssst, hey you, Yeah you, Who do ya think I'm talking to, the mouse?"
impersonate "Zarvox" "Hello, my name is Zarvox. That looks like a peaceful planet."
else
impersonate "Agnes" "$phrase"
impersonate "Albert" "$phrase"
impersonate "Alex" "$phrase"
impersonate "Bad News" "$phrase"
impersonate "Bahh" "$phrase"
impersonate "Bells" "$phrase"
impersonate "Boing" "$phrase"
impersonate "Bruce" "$phrase"
impersonate "Bubbles" "$phrase"
impersonate "Cellos" "$phrase"
impersonate "Deranged" "$phrase"
impersonate "Fred" "$phrase"
impersonate "Good News" "$phrase"
impersonate "Hysterical" "$phrase"
impersonate "Junior" "$phrase"
impersonate "Kathy" "$phrase"
impersonate "Pipe Organ" "$phrase"
impersonate "Princess" "$phrase"
impersonate "Ralph" "$phrase"
impersonate "Trinoids" "$phrase"
impersonate "Vicki" "$phrase"
impersonate "Victoria" "$phrase"
impersonate "Whisper" "$phrase"
impersonate "Zarvox" "$phrase"
fi
}
impersonate () {
local voice=$1
shift 1
echo "$voice says ... \"$@\""
say -v "$voice" -r 250 "$@"
}
if [ -z "$1" ]; then
usage
fi
run $@
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment