Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can do this via a terminal command: <code>defaults write</code></p> <p>I managed to dig out the preference file that's being written to when you toggle this setting: <code>~/Library/Preferences/com.apple.speech.synthesis.general.prefs.plist</code>. Note that this file may not exist on your computer; it's only created if you've toggled the "Announce the time" checkbox in System Prefs.</p> <p>The key you're changing the value for is <code>TimeAnnouncementsEnabled</code>, which takes a boolean value of <code>YES</code> to turn on the announcements and <code>NO</code> for off. This key is inside of the dictionary <code>TimeAnnouncementPrefs</code> which houses the other settings related to the voice announcements. The terminal command to turn on the time announcements is:</p> <pre><code>defaults write com.apple.speech.synthesis.general.prefs TimeAnnouncementPrefs -dict TimeAnnouncementsEnabled -bool YES </code></pre> <p>To use this in an AppleScript simply do the following (to run a terminal command from AppleScript):</p> <pre><code>do shell script "defaults write com.apple.speech.synthesis.general.prefs TimeAnnouncementPrefs -dict TimeAnnouncementsEnabled -bool YES" </code></pre> <p>That should do it. The other preference keys (voice, custom rate and custom volume) will be reset to their defaults if you use the command as above. If you want to set them to non-default values you'll have to explicitly set them along with the above key value. However, since there are some nested dictionaries you'd probably need to look at using plistbuddy (which isn't installed by default AFAIK). <strong>However, if you only want to set the announcement on/off option, don't worry about it. This will set you up!</strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload