Possible to use Siri to trigger custom actions?
These days, Macs have Siri.
Siri even works offline for tasks like dictation.
When Siri interprets audio into written words, can I somehow capture those written words, and trigger a self-defined action if a certain pattern is detected?
For example, if I say "Hey Siri, run my backup script", could a shell script located in my home folder then be executed?
(Bonus question: If Siri cannot do this, is there some other free technology that can?)
That’s one interesting idea. It seems to be possible by registering custom vocabulary in your app. Since there is SiriKit
it should be possible. Besides people from Homebridge
achieved the same you want with garage doors and so on.
https://github.com/nfarina/homebridge/blob/master/README.md
Things like custom vocabulary can be found here: https://developer.apple.com/documentation/sirikit/registering_custom_vocabulary_with_sirikit
So if I understand the docs correctly you can specify
IntentPhrases
that allow you to react for a word shell
for exemple
But I love the idea. First thing I will connect will be ‘fastlane’ and I will shout ‘deploy!’
While it seems possible through Siri, using the built in dictation commands seem easier to run a script.
You can see how here: https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/UseDictationtoRunScripts.html