- Speech To Text Macbook
- Text To Speech Demo
- Shortcut For Text To Columns
- Text To Speech On Windows 10
- Mac Text To Speech Online
- Text To Speech Generator
- Word Text To Speech Settings
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?
bmike♦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:
- Launch Automator.app
- Create a new Quick Action (previously Service)
- Add a Run AppleScript action
Copy and paste in the AppleScript below:
- Save the service as Speak in French
To use the service:
- Select text in TextEdit or Safari
- Control + Click to reveal the Context Menu
- 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 MilnKind 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.
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:
- Select any text in any application
- Control+Click to reveal the context menu
- 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.
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 thesay
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).
- While OSX offers no programmatic way to change the default voice, you can use a prepackaged service built on the
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:
I wrote a tool for that, just go to:
Launch Automator.app
Create a new Service
Add a Speak Text action
Select Samantha
Save the service as SpeakSamantha
Setup a keyboard shortcut for the service
Open System Preferences
Select Keyboard
Select Shortcuts
Select Services
Create a shortcut, Command + Alt + 1 for SpeakSamantha
Speech To Text Macbook
To use the service
Open a browser
Select some English texts
Press Command + Alt + 1
To stop the speech (Method 1)
- Press Alt + ESC
To stop the speech (Method 2)
Click the spinning cog icon in the menu bar
Click the ⨂
To add a second voice
Repeat the process above adding the following minor changes
Select a second voice, for example, Anna, a German voice
Save the service as SpeakAnna
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.
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
.
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged macoskeyboardtext-to-speech .
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♦1 Answer
You can use the following Keyboard Maestro macro:
- Add a double click at current mouse location action.
- 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. - Set the macro to be triggered on a hot key.