Main menu

Monthly Archives: January 2013

someone once said — something along the lines of — “if you ever want to invade australia, do it in january, because there’s no-one doing a goddamn thing.” — which goes some way to explaining why there have been no posts this month.

so we’re going to finish this slack month with a slack post — but one which demonstrates a handy little applescript trick — the say command. and we’re going to make it a bit aussie-themed on this important anniversary because, well, why the hell not?

to date, the scripts on this site give feedback to users through dialogs — little windows that pop up with appropriate messages. but there’s no reason why you can’t use apple’s text-to-speech technology to give verbal feedback to users when tasks are complete, or whatever.

… and it really is as simple as this :

say "something"

that will give you something in whatever the default voice is set to. there are a bunch of different voices to choose from in the speech panel of your system preferences :

but …
you have to be a little careful with your voice choice. here’s a little homage to monty python :

say "strailya, strailya, strailya, we love you" using "Bruce"

now bruce doesn’t do a bad job (alex is better) but how would it sound with an australian voice? well the results are disappointing — karen (who pronounces her name more like ‘corinne’) doesn’t know how to speak australian. i reckon she’s a ring-in. when asked to say ‘strailya’ — a very basic aussie term — she instead says ‘stray liar’ — very odd behaviour for an aussie sheila.

the closest you’ll get with poor old kazza is this :

say "strail yuh, strail yuh, strail yuh, we love you" using "Karen"

… and the same goes for that un-australian “Lee” too — flamin’ wowser.

there are a few other things you can play around with when using the say command (rate, pitch modulation, volume, etc). check out the standard additions dictionary. unfortunately, not all properties work with all voices (eg. pitch and modulation do not affect the australian voices) :