Thursday, February 12, 2009

Text to Speech in Mac OS X

·

This tip was written by 11 year old Alex Hwang. Be sure to check out his blog, as he's recently posted an application that allows you to customise your Dock without having to play around with Terminal commands...

Since Mac OS X 10.4 Tiger, the amazing operating system has included many built in things. One of the many great things included with Mac OS X is called TTS (text to speech). I'll be covering an easy way to dive into text to speech. All you have to do is fire up Terminal.app (/Applications/Utilities/Terminal.app) and type in:


say 'text to say with no quotes'


So if you type in:

say Hello World

And hit return, then (as long as your speakers are turned on) your computer will 'say' hello world to you! A more advanced way to do this is to type in:

osascript -e 'say "some text" using "some voice"'

Text to Speech in Mac OS X 1


You can check the voices your system has in System Preferences in the Speech pane under the Text to Speech tab. You might have to select “Show more voices” at the bottom to get the full list.

[Matt adds: For any Cocoa application (Safari, TextEdit, etc.) there is a "Start Speaking Text" option under the Services menu (in the Application menu) that will speak your selection in the currently selected system voice. Great if you want a web page or long piece of text read to you. You can even assign a keyboard shortcut to it in the "Keyboard and Mouse" section of System Preferences. Also, since Leopard, Apple has added a new voice, Alex, which is much more realistic than the usual "robot" sounding voices that are available.]

cText to Speech in Mac OS X 2

0 comments:

Post a Comment

Related Articles


Related Article Widget by Hoctro

About Me


嗨,我是花,居住在印度兴奋的Windows,Linux中国的外籍人士和所有高科技的东西

Hi, I am Hua, a chinese expat residing in India excited about windows, linux and all things tech

Receive updates for free

Enter your email address:

Delivered by FeedBurner

Mobile Version

Bookmark

Bookmark and Share

Blog Archive