Search code examples
iosswiftsirisirikit

Make iOS app detect if user is trying to call for Siri - swift


I am wondering if you can listen to user call to Siri ? Every time Siri is opening (resulting to a "Hey Siri"), I want my app to register it. The goal would be, for example, to count the number of calls, or to do something in parallel inside my app every time Siri is called. I know that Siri's API is quite hermetic ... is it possible ?


Solution

  • As stated, no, but I'll tell you another reason why.

    To avoid running the main processor all day just to listen for the trigger phrase, the iPhone’s Always On Processor (AOP) (a small, low-power auxiliary processor, that is, the embedded Motion Coprocessor) has access to the microphone signal (on 6S and later). We use a small proportion of the AOP’s limited processing power to run a detector with a small version of the acoustic model (DNN).

    https://machinelearning.apple.com/2017/10/01/hey-siri.html

    tl;dr

    You don't have permission to access what the AOP is doing, so you will never know when it is called.