Trigger script upon 'mic on'

There is, indeed. It is described in German, though, but is working on English machines as well: