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

Hi everyone,

Just wanted to share this cool way to integrate KM with Dictation. No need to buy any extra software like Dragon.

  1. Download this script. I put it on my Dropbox/applescripts folder.
    km_macro_as_param.scpt http://cl.ly/3Q3C3f3a261W

  2. Create a dictation command on Automator
    http://cl.ly/3P392X12083G

  3. Create the macro on keyboard maestro (notice the name “clean dock”). Names must match exactly.
    http://cl.ly/17432o350q1N

  4. Link the two with Automator
    http://cl.ly/3v1A3M0M3i1n

Done! You can create a voice command for any macro. These are a few of the commands that I have configured, and in parenthesis is what i say.

  • lock computer (“Computer, lock”)
  • play a particular radio (“Computer, play radio”)
  • play whitenoise (“Computer, white noise”)
  • record the screen (“Computer, record screen”)
  • connect to vpn (“Computer, VPN”)
    etc.
    You can use these commands even if you’re not dictating, which is pretty cool.
    http://cl.ly/1Q0f0z0w2h2W

Hope you guys find this useful.

5 Likes

Thanks for sharing. That is very cool. :+1:

Hey guys, I just wanted to share this new way to integrate dictation. You can skip Automator altogether and just use the "Open URL" command to trigger a KM action.

Very cool!

1 Like

I couldn’t find an “open URL” command in the Accessibility / Dictation panel, but the “Open Document” command will let you specify a keyboard shortcut to be performed in any application. Just type in a KM shortcut and give it a name to listen for.

Hey, wanted to post here and update this. there is a much easier way of doing this. so I found out there seems to be a much easier way to do it using automator:

Open automator and create a dictation command:

image

Have it run the following applescript:

on run {input, parameters}

	tell application "Keyboard Maestro Engine"
		do script "[**insert the name of your macro here**]"
	end tell
	
	return input
end run

As shown here:
image

That's it!

Hope this helps people like me trying to get dictation commands to work!

1 Like

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.