applescript voice control code example
Example: applescript voice control
tell application "System Preferences"
reveal anchor "Dictation" of pane id "com.apple.preference.universalaccess"
-- activate
end tell
delay 0.5
tell application "System Events"
tell process "System Preferences"
click checkbox "Enable Voice Control" of group 1 of window "Accessibility"
end tell
end tell
tell application "System Preferences" to quit