macOS Time announcement — how to speak a longer phrase
-
01-06-2021 - |
Question
In macOS (Big Sur), ever since I did:
defaults write ./com.apple.speech.synthesis.general.prefs TimeAnnouncementPrefs -dict u -bool YES
the system announces the time as, for example, "four-thirty," whereas it used to announce the time as "It's four-thirty" (with the word "it's" and, on the hour, "o-clock").
Here's the prefs structure (~/Library/Preferences/com.apple.speech.synthesis.general.prefs
):
{
TimeAnnouncementsEnabled = 1;
TimeAnnouncementsIntervalIdentifier = EveryQuarterHourInterval;
TimeAnnouncementsPhraseIdentifier = ShortTime;
TimeAnnouncementsVoiceSettings = {
CustomVolume = "0.2046729";
};
}
I've tried:
- With and without
TimeAnnouncementsPhraseIdentifier
. - Deleting the file
com.apple.speech.synthesis.general.prefs
and then turning on the time-anounce checkbox in System Preferences. That restores the file, but not the long speech. - Using Time Machine to restore an old version of
com.apple.speech.synthesis.general.prefs
.
After each change, I've killed the Dock to reload the preferences.
How do I get back the "it's" and "o'clock" wording? What values can TimeAnnouncementsPhraseIdentifier
take on?
Solution
The solution:
(Optional) to get the plist in
com.apple.speech.synthesis.general.prefs
correct, set the structure as shown in my original question. Or, simply delete that file and turn on the Time Announce checkbox in System Preferences (Dock & Menu Bar, Clock). That will re-create the file.In the two
defaults
commands, use-dict-add
(rather than-dict
) so the commands won't delete any existing parameters. At this point, the defaults command can be used to turn the time announcements on and off. But, "it's" and "o-clock" are still missing.Reboot, and "it's" and "o'clock" will return. I still don't know what values
TimeAnnouncementsPhraseIdentifier
can take on, but ShortTime works (after a reboot).
But, my original idea of using defaults write
to change the plist didn't work anyway. The changes do not take effect without a reboot because the OS caches the plist.