How To Change Voice For Text To Speech On Mac

Question: Q: Text to Speech on Macbook Pro Kindle. I've tried to set up the text to speech on Mac Kindle and it's not working. Everytime I highlight the words I want to hear read aloud, the highlighted words are lost and my laptop fails to read the words. You can change the keys if you want. Aug 29, 2013 12:53 PM.

Active2 years, 4 months ago

I love the text to Speech feature of Mac OS X. Since I'm not a native English speaker I'm very happy about all the additional languages added since Lion came out. However, I do use English as well as my native language (German). Changing voices is a bit of a pain. It just requires too many steps to be comfortable.

Is there any way to make this easy? I was looking for shortcuts, maybe a drop down menu somwhere up in the right corner, anything would be fine.

Since my search was not successful, I hope to find some advice here on SuperUser. Thanks a lot!

cuRoman

user83946

4 Answers

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

You could also create a service in Automator:

There is a bug in 10.7 and 10.8 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 while speaking text.

Another option would be to use UI scripting to change between two voices:

Changing the SelectedVoiceID key in com.apple.speech.voice.prefs.plist also works, but I don't know how to apply the changes immediately.

How To Make A Voice For Text To Speech

LriLri
32.6k5 gold badges95 silver badges135 bronze badges

Thank you very much Lauryi.

I have extended your UI scripting approach to work properly with german and english voices.The problem is, when your system language is not english, all non system languages are hidden (if not currently selected). You have to select: show more voices.. first to get to the desired language. My code lack a bit of elegance, but works. Here it is (updated):

kantordekantorde

Direct changes to ~/Library/Preferences/com.apple.speech.voice.prefs.plist are not really needed if you get the bash-script Voices which really adds all the command-line functionality you need.

An Apple Script to change the standard voice to Alex using Voices would simply look like this:

I do prefer the terminal, and instead of testing the polyglot menu-bar intrusion, I made this (admittedly simple-stupid) shell script (which uses voices) for my language-switching needs. With it, All I do to change the default language is to pop into the terminal to type speak swedish or speak french. This fits excellently into my workflow. I hope you can find a solution that fits yours.

I save it to my scripts as 'speak.command', chmod it +x, and add the appropriate alias to my .bash_profile to evoke it by typing speak.

Josef LilljegrenJosef Lilljegren

I Wrote a Status Bar Tool for that:

Apperantly it still works in Sierra

Fred FlüggeFred Flügge
Active2 years ago

I'm looking for a way to change the voice with a shortcut:going in to settings->accessibility->Speech and setting the voice 'Alex'take's to long.

Does anyone know a terminal command? Or a way to change it with a keyboard shortcut?

I use speech in English and in Dutch so i have to manually change the voice a couple of times a day. thx

MaximMaxim

1 Answer

Text To Speech Generator

Have a look at https://github.com/mklement0/voices. Voices is a command line tool for changing the default text-to-speech voice. But the author of the tool warns that:

Change

As of macOS 10.12 (Sierra), there is no documented programmatic way to change the default voice. Thus, this utility makes use of undocumented system internals, which, unfortunately, means that future compatibility of this feature is uncertain.

But at the moment, it seems to work with the latest Sierra version.

In addition, the author also provides links to alternatives, like:

If you have Alfred with its Power Pack, consider workflow speak.awf as a superior alternative.

cellocello
4,1443 gold badges16 silver badges25 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

Not the answer you're looking for? Browse other questions tagged macosterminalaccessibilitytext-to-speechmacos-sierra or ask your own question.