Short Cut For Text To Speech On Mac

Active2 months ago

I use Mac's Text to Speech function a lot. Under Settings > Speech > Text to Speech I also have set a 'Key' for quick access.

You may think you have to wait for Siri to appear in macOS Sierra before you can talk to your Mac, but your Mac already has a way to listen to everything you say and to turn what it hears into text. If the Slow Keys or Sticky Keys feature is turned on in the Accessibility pane of System Preferences, the default keyboard shortcuts for dictation might not work. If you need to use those accessibility features, create a custom dictation shortcut: Choose Apple menu > System Preferences, click Keyboard, click Dictation, then choose “Customize” from the Shortcut menu.

Since I also want Text to Speech to read German and OS Lion offers Voices for other languages, I would like to have a second shortcut for German.

Does anyone know where I can set this? Or is the only way to constantly change the System Voice before I want a German text to be read? (And then reset the voice to Alex for English texts)? And what about French text?

What options exist for this general problem?

bmikeSpeech
168k46 gold badges304 silver badges662 bronze badges
JosephJoseph
3212 gold badges7 silver badges23 bronze badges

7 Answers

You can use the say command with OS X's other voices to get different languages. Use the Thomas voice to get French pronunciation or Yannick for German.

In this example, I will use Thomas and French as this is what I know but Yannick should work as well for German text.

Try the following command in Applications > Utilities > Terminal.app:

If this is acceptable, you can wrap the say command up in an Automator service; which we will do next.

Automator Service

To create the Automator Service:

  1. Launch Automator.app
  2. Create a new Quick Action (previously Service)
  3. Add a Run AppleScript action
  4. Copy and paste in the AppleScript below:

  5. Save the service as Speak in French

To use the service:

  1. Select text in TextEdit or Safari
  2. Control + Click to reveal the Context Menu
  3. Select Services > Speak in French

Et voilà ! Other languages and voices are available.

This Automator approach allows you to keep your computer default voice set to your preferred language. While allowing selected text to be read in the alternative voice.

You can list the available voices and their associated languages with the command:

The available voices can change between versions of macOS. On macOS 10.13, the command returns:

Graham MilnGraham Miln
29.5k5 gold badges61 silver badges94 bronze badges

Kind of old post and maybe you have found a solution already.One way to simplify this is with Automator.

Open Automator, choose Service,Service receives selected text,drag action 'Speak Text' to build worklowselect Voice (for example: Ryan Speaking)Save

Repeat with different voices.

(The Services List can be edited/cleaned up with Service Scrubber Application and partly under System Preferences > Keyboard > Keyboard Shortcuts > Services)

Edit:Now that you have two or more Voices under the Services Menu, you can go to:System Preferences > Keyboard > Keyboard Shortcuts > Application Shortcutsand create a new Shortcut for each voice.

So far, it works like this on my machine (OS 10.6.8):Default System Voice: Ryan (Infovox) Shortcut Selected in Speech Pref to Control+S.This starts and stops English text.

The German voice I have assigned Control+Y (Yannick voice from Lion OS).Control+Y starts German voice for German selected text; which can be stopped by clicking the main start/stop shortcut twice, here Control+S+S. The reason for twice is because pressing it once starts the English voice over the German voice.That's the best I could come up so far. Make sure the shortcuts don't conflict with other shortcuts. You will notice that the additional shortcut allows you to start several voice threads, talking over each other plus the default system voice, which drives up processor activity, but no problem if one remembers to stop the speaking by double-executing of the shortcut for the default voice.

Not sure if this works system-wide, but works in my browsers, Mail, and the BookReader app I'm using.

Edit 2:I have noticed that when activating a secondary text-to-speech voice via the Automator Service the Automator Runner process drives up processor activity to above 100% with fans speeding up. Not sure if there is a solution to this.

MikofoxMikofox

You could also set the system voice to a French one.

Go to System Preferences > Dictation & Speech > Text to Speech and set the system voice to Thomas for example.

Then:

  1. Select any text in any application
  2. Control+Click to reveal the context menu
  3. Choose Speech > Start Speaking

There is also an option to set a shortcut, so you can just select any text and press the shortcut to start speaking in French.

ArthurArthur

Using a custom service with the standard Speak Text action to speak selected text with a specific alternative voice has one major drawback, as detailed in Mikofox's answer:

You cannot easily stop playback the way you can with the built-in TTS service simply by pressing the keyboard shortcut again.

There are two solutions:

Disclosure: I created the prepackaged services and the voices CLI

  • Build a custom service with a Run Shell Script action instead, in which you use the say CLI, which allows implementing a playback toggle (stopping speech if invoked while still speaking from previous invocation)

    • See below for a simple implementation that works, but it won't honor any custom speaking rates (words per minute) that you may have configured for individual voices via System Preferences.
    • A solution that honors the custom speaking rates requires quite a bit more work; you can find a prepackaged servicehere; or use the direct download link (will stay current)..
  • Alternatively, create a service that switches the default voice on demand, which then allows you to use the built-in TTS service with its playback toggle feature.

    • While OSX offers no programmatic way to change the default voice, you can use a prepackaged service built on the voices CLI:
      Follow the instructions here or use the direct download link (will stay current).

Simple implementation of a service with playback toggle:

As stated, this won't honor custom speaking rates configured for the chosen voice.

  • Create a new service in Automator
  • Leave the defaults (service receives text in any application)
  • Add a Run Shell Script action and paste the following:
Community
mklement0mklement0

I wrote a tool for that, just go to:

Fred FlüggeFred Flügge
  1. Launch Automator.app

  2. Create a new Service

  3. Add a Speak Text action

  4. Select Samantha

  5. Save the service as SpeakSamantha

Setup a keyboard shortcut for the service

  1. Open System Preferences

  2. Select Keyboard

  3. Select Shortcuts

  4. Select Services

  5. Create a shortcut, Command + Alt + 1 for SpeakSamantha

Speech To Text Macbook

To use the service

  1. Open a browser

  2. Select some English texts

  3. Press Command + Alt + 1

To stop the speech (Method 1)

  1. Press Alt + ESC

To stop the speech (Method 2)

  1. Click the spinning cog icon in the menu bar

  2. Click the

To add a second voice

Google
  1. Repeat the process above adding the following minor changes

  2. Select a second voice, for example, Anna, a German voice

  3. Save the service as SpeakAnna

  4. Create a keyboard shortcut, Command + Alt + 2 for SpeakAnna

A known small issue: Don't press a shortcut again before you end the speech or the speech ends. Otherwise, you will get an error message like the following.

ffmaerffmaer

As Mikofox mentioned, you can make an Automator service for speaking text:

There is a bug in 10.8 and 10.7 where the shortcuts for Automator services don't always work until you hover over the services menu from the menu bar.
WorkflowServiceRunner can also use over 100% CPU when speaking text.

I have used FastScripts to assign a shortcut to this script:

Another option is to just run something like pbpaste | say -v kyoko.

LriLri
81.9k12 gold badges175 silver badges241 bronze badges

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged macoskeyboardtext-to-speech .

Active2 years, 3 months ago

I want it to speak the word without selecting it, just hovering over it + a shortcut. Or by pressing a shortcut after using the lookup feature in Mac.

Text To Speech Demo

grg
145k25 gold badges229 silver badges340 bronze badges
Yaman KJYaman KJ

1 Answer

You can use the following Keyboard Maestro macro:

  1. Add a double click at current mouse location action.
  2. Add a press ⌥⎋ action.
    ⌥⎋ the default shortcut for ‘Speak selected text’, set in System Preferences → Accessibility → Speech. Change this to match the preference at that location.
  3. Set the macro to be triggered on a hot key.
grg

Shortcut For Text To Columns

Text To Speech On Windows 10

grg

Mac Text To Speech Online

145k25 gold badges229 silver badges340 bronze badges

Text To Speech Generator

You must log in to answer this question.

Word Text To Speech Settings

Not the answer you're looking for? Browse other questions tagged macosshortcuttext-to-speechspeech .