Customise a Service

Customise a Service
Mac Tip #415, 16 December 2009

You might like to ‘tune up’ some of the Services available in Snow Leopard. For example, if you render text to speech, you might prefer the voice Vicki, to the default Alex, or perhaps to save the resulting audio file in a different location. This Tip explains how.

Watch the video


Please visit the video on YouTube too, leave comments and rate it. That helps spread the word about the MacTips. Subscribing to the channel helps too!

A post at Moving at the Speed of Creativity explains how to get Snow Leopard to convert highlighted text in many applications into an audio file.

I tried it out, but wasn’t 100% satisfied with the results. I wanted a different voice and a different playlist. That led me to create this MacTip.

Text to Speech steps

To summarise the steps to take first:

  1. In Snow Leopard, Mac OS X 10.6, go to System Preferences > Keyboard > Keyboard Shortcuts > Services.
  2. Enable the Service Add to iTunes as a Spoken Track.
  3. Control Click on some selected text. A contextual menu appears.
  4. Choose Add to iTunes as a Spoken Track from the contextual menu. Snow Leopard converts the selected text to speech and adds the audio file to iTunes.

Find and backup the workflow file

The built-in Automator workflow is named Add to iTunes as a Spoken Track.workflow and is located in /System/Library/Services/.

  1. Select the file and choose Copy from the Edit menu.
  2. Open a Folder to keep the backup copy in, for example Documents.
  3. Choose Paste from the Edit menu. A copy of the workflow is saved in the folder you selected.

It’s very hard to actually change the built-in workflow so the backup step isn’t entirely necessary. It could serve as a useful basis for your own Services though.

Edit the workflow file

Automator workflow for text to speech.

Automator workflow for text to speech.

Double click the original workflow file. Automator opens and displays the steps in the workflow.

Make changes to the workflow, for example by choosing a different voice, a new filename, a different location for saving the file, a different audio encoder or a different Playlist name.

I find the voice Vicki to be very pleasing.

If you didn’t want to add the file to iTunes you could remove the second and third workflow steps.

To remove a step from a workflow click the x in the top right corner of the step you no longer need.

Save the workflow as a Service

Once you’re happy with the new workflow choose File > Save As….

A dialog box appears in which you can edit the name of the Service. You can not choose a location.

Why not just Save? The original Service is saved in the System folder for the whole machine. We Users aren’t supposed to fool around with the files in there, as we could easily wreck things. If you try the Save command you’ll see an alert that you can’t do that.

Save your new Service with a name that’s meaningful to you.

Where’s my new Service saved?

Automator saves the Service in your personal Library at ~/Library/Services — in other words, it’s in the Services folder in the Library Folder under your Home folder.

Use the customised Service

To use your new Service select some text and call up the Services menu. Choose your customised Service.

The Service runs and carries out the actions you gave it. If you were saving a file to iTunes then iTunes should open.

Look for your track and play it to confirm everything worked correctly.

This Tip was inspired by Jo Fothergill, who pointed me to Wesley Fryer’s post: Make any text into a computer-generated audio file with Snow Leopard.

Do you have any comments on this Tip? Add them below.

Related posts

[wpzon keywords="pressure cooker" sindex="PCHardware" snode="1232597011" sort="salesrank" listing="8"]

One Comment;

  1. Ben said:

    Thank you so much for this post! It was very helpful to me today!

Comments are closed.