Emulate Recognition Help Needed ...

Get help with using AutoHotkey and its commands and hotkeys
aShai
Posts: 18
Joined: 19 Jun 2015, 03:21

Emulate Recognition Help Needed ...

21 Jun 2015, 22:45

I am stuck on the EmulateRecognition method and need help with trying to emulate a command to speech recognition using an AHK script. I have searched the web extensively looking for a solution to this problem. For example the code/script is as simple as emulating "start listening". Any help will be greatly appreciated.
Elgin
Posts: 121
Joined: 30 Sep 2013, 09:19

Re: Emulate Recognition Help Needed ...

23 Jun 2015, 05:09

Hi!

The code for EmulateRecognition is straightforward:

Code: Select all

Listener:=ComObjCreate("SAPI.SpSharedRecognizer")    
Listener.EmulateRecognition("some stuff you want recognized")
But: afaik it only works for emulating speech commands from grammars owned by the application which uses the EmulateRecognition command, making it rather useless except for testing your own app. It does not work for emulating commands of the Windows speech recognition widget (like "start listening") or other speech enabled applications from an AHK script. Even running the script as administrator does not change this. If there is a workaround for this limitation I'd be happy to know about it...

If you just want to emulate "start/stop listening", simulating a Ctrl-Win keypress might be a workaround for you.
aShai
Posts: 18
Joined: 19 Jun 2015, 03:21

Re: Emulate Recognition Help Needed ...

23 Jun 2015, 05:55

Nice, Thanks! I was over thinking this waaaaaaaaaaaaay too much!!!

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], mikeyww, Ross, TAC109, teadrinker and 47 guests