See How to Implement Voice Control/Triggers for KM Macros.
For more information, see the wiki Searching the Forum for Answers section.