Voice Control and Shortcuts

If you’ve been looking for an easy quick way to launch your favorite shortcut, this post is for you. With the power of macOS and its built-in Voice Control abilities, running a favorite shortcut is simply a matter of saying: “Run (Title of Favorite Shortcut)”

Voice Control Shortcuts
Triggering shortcuts using Voice Control

With macOS v12.3 Apple has provided a mechanism for storing and loading sets of Voice Control commands stored in a text file in a standard property list format.

This blog post provides a free AppleScript applet you can use to generate Voice Control command files containing Voice Control commands for every shortcut in a chosen folder in the Shortcuts application.

DOWNLOAD APPLET (requires macOS v12.3)

Opening dialog for script applet

* Applet written in AppleScriptObj-C using the Script Debugger application from Late Nite Software

Once you’ve generated a commands file, its commands can be installed using a new menu found in the Voice Control preferences dialog:

voice-control-preference-pane

 1  Accessibility Preferences • The Accessibility preferences pane in the System Preferences application.

 2  Voice Control tab • The Voice Control tab of the Accessibility preferences.

 3  Advanced Actions menu • This menu contains options for importing/exporting Voice Control vocabulary and commands.

 4  Import Commands • Selecting this option provides the ability to import a Voice Control commands file that contains custom commands.

Using the Application

When you run the notarized AppleScript applet for the first time, security access dialogs will be presented for you to approve.

Screenshot Screenshot

Once approval dialogs have been completed, you will be presented with a list of names of the folders in the Shortcuts application. Select the folder containing the shortcuts you wish to add the currently available set of Voice Control commands.

A Voice Control commands file will be generated at your specified location. Use the import control shown in the “Advanced Actions” pop-down menu  3  in the Voice Control preferences pane to select the commands file and complete the import process.

By default, each command created for the selected set of shortcuts is structured in the following format:

“Run (Name of Shortcut)”

You can edit the syntax of these commands by clicking the “Commands” button in the Voice Control preferences pane.

Enjoy! — Sal Soghoian
“The power of the computer should reside in the hands of the one using it.”

FAQ

Q: If I rename the shortcut and/or move it out of the Shortcuts folder, will the Voice Control command still work?
Yes, the voice command will still be linked to the shortcut. The shortcut identifier used by Voice Control looks something like this: CB5AA440-2B0C-46B0-A4DB-EBBC0B29D932 so the name or parent folder of the shortcut should not matter to Voice Control.
Q: Can the Voice Control command be edited, disabled, or deleted?
Yup. Click the “Commands” button in Voice Control preferences and your command will be listed in the forthcoming editing window.
Q: What about iOS/iPadOS? Can shortcuts be triggered by voice on those devices?
Yes. However, I haven't figured out how to generate Voice Control commands files on those platforms at this time. You’ll have to create the Voice Control commands manually (see below). Go to: Settings > Accessibility > Voice Control > Customize Commands

What can Voice Control do?

In addition to providing an extensive built-in library of navigation and control actions, Voice Control offers the ability to create custom voice-triggered commands that perform actions on the device.

On iOS (v14) and iPadOS (v14), custom Voice Control commands can:

On macOS 12.3, custom Voice Control commands can:

Regardless of the host device, custom Voice Control commands can have designated scope to be available either only within a specified application, or system-wide from within any application.

Apple Voice Control Support Documentation:

 

 

 

Sal Soghoian

DISCLAIMER