Want Your Computer to Speak to You? Try this!

in #technology7 years ago

ScriptFile

Mac computers come with a scripting language named AppleScript.

One fun thing you can do is use it to have your computer speak back to you. It can be very addicting.

Open up Script Editor at /Applications/Utilities/Script Editor.app
and add the following.

set theTitle to "What would you like me to speak?"
set defaultAnswer to "Hi there, it is nice to meet you!"
set {theButton, theResult} to {button returned, text returned} of (display dialog theTitle default answer defaultAnswer)

say theResult using "Karen"

There are several options you can use as well as selecting different voices. The above will speak using the voice of "Karen" and alter the pitch so that her voice is very low and speaks very fast.

# Speaking with a low voice at a fast pace
say theResult using "Karen" pitch 0 speaking rate 500

Below, we change the pitch to be high and also speak fast.

# Speaking with a high voice at fast pace
say theResult using "Karen" pitch 100 speaking rate 500

This time we have "Fred" speak at his normal pitch and speed.

say theResult using "Fred"

You can save the file as a runnable application and then launch it with a mouse click.

If you would like more information about AppleScript and how to use it, there is a good forum at Macscripter.net and many others with a Google search.

Enjoy!

Coin Marketplace

STEEM 0.20
TRX 0.14
JST 0.029
BTC 67079.94
ETH 3266.85
USDT 1.00
SBD 2.64