License Public Domain
Keywords
audio (1) text-to-speech (2)
Permissions
Viewable by Everyone
Editable by All Siafoo Users
Hide
Know what you're getting – Unlike many sites, all our code is clearly licensed. Join Siafoo Now or Learn More

Get Your Mac to Say Whatever You Want Atom Feed 0

Do easy text-to-speech on OS X with the 'say' command.

In Mac OS X, the say command will take text from stdin or a file and output it to the speakers, an AIFF file, or a service or IP via AUNetSend.

For a quick example, just type say in the terminal, and then each line you type will be said aloud.

Check the man page for more info.

That's it... I just thought this was cool. Feel free to add anything useful.

Further Reading

Inspired by this xkcd comic:

http://www.siafoo.net/image/134

Comments

over 7 years ago (14 Jan 2009 at 05:42 PM) by Stou S.
Yes but how do you change the volume?
over 7 years ago (14 Jan 2009 at 09:42 PM) by David Isaacson
hehe i dunno... one thing you could do pretty easily is run an applescript through 'osascript', the AppleScript could change the volume fairly easily, I think.
over 7 years ago (14 Jan 2009 at 09:44 PM) by David Isaacson
Turns out I am correct... "osascript -e 'set volume 0'" will mute the computer, any number from 1 to 10 will set the volume.
over 7 years ago (14 Jan 2009 at 09:45 PM) by David Isaacson
Really the xkcd strip is misleading... I figured this out in about 30 seconds through trial and error. A quick google search shows the correct method at the top too : )
over 7 years ago (14 Jan 2009 at 09:59 PM) by Stou S.
Gah that's the last time I trust a comic strip.