This is how I integrate OSX Dictation with KM, so I can assign voice commands to macros

Thanks for sharing.

As an alternate, you can use the macro UUID (menu Edit > Copy as > Copy as UUID) instead of its name.
This will ensure the macro runs even if you change the name later.
For each of ref, you can enter the Macro name in comments.