Publishers of technology books, eBooks, and videos for creative people

Home > Blogs > Mac Productivity: Quick Scripts and Workflows - Implementing a Spoken Dictionary

Mac Productivity: Quick Scripts and Workflows - Implementing a Spoken Dictionary

By  May 29, 2012

Topics: Apple, Operating Systems, Productivity

A handy feature in Mac OS X is the ability to quickly and easily define words.  In most applications, just Control+click the desired word, and choose Look Up "TheSelectedWord" from the contextual menu to bring up the system-wide dictionary.  Even easier, if you've got a trackpad, just double-tap the word with three fingers to display its definition.  Automator lets you get even more creative.  You can expand these useful dictionary services with one that will read the definition to you.  Here's how you do it...

1. Launch Automator (in /Applications)

2. When prompted to choose a type of workflow, select Service and click Choose

Creating an Automator Service workflow

3. Set the popup menus at the top of the workflow area to receive text in any application

Setting the Service to receive text input in any application

4. Search for the Get Definition of Word action, and drag it to the workflow area.  When you do this, the action "links up" with the top of the workflow area.  This tells you that the action receives input.  When the workflow runs, any selected text is passed to this action as input.  The Get Definition of Word action's Dictionary popup menu is set to New Oxford American Dictonary by default.  You may want to experiment with the different options here, as each of the available dictionaries defines words differently.

Adding the Get Definition of Word action to the workflow

5. Search for the Speak Text action, and drag it to the end of the workflow.  It links up to the previous action, indicating that it will receive the definition of the selected word as input.

The completed workflow, configured to get a selected word's definition and speak it aloud

6. Save the workflow, and name it Text • Audio Define Word

Saving the Automator workflow as a Service

Now that the workflow is saved, its accessible whenever you’ve selected text in an application with support for services.  To trigger it, Right+Click or Control+Click on a word, and choose Services > Text • Audio Define Word from the contextual menu.

Triggering the workflow from the Services contextual menu.

You can also trigger it from the application menu by selecting Services > Text • Audio Define Word.

Triggering the workflow from an application Services menu.

Now you've got a quick spoken dictionary ready to help add clarification when you get stuck writing that detailed report about the history of quantum physics, or when your 4th grader is studying for Friday's vocab test.

For more on AppleScript and Automator, check out my book  Automator for Mac OS X: Visual QuickStart Guide, as well as my video podcast series Mac Automation Made Simple.