Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Post a reply


In an effort to prevent automatic submissions, we require that you type the text displayed into the field underneath.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Re: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Post by aShai » 26 May 2016, 02:51

Thank You Very Much Elgin!!! I Truly Appreciate This!!!

Re: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Post by Elgin » 26 May 2016, 01:58

Sure:

Code: [Select all]GeSHi © Codebox Plus

DgnEngine:= ComObjCreate("Dragon.DgnEngineControl")
DgnEngine.Register(0)
DgnEngine.RecognitionMimic("what can I say")

Re: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Post by aShai » 25 May 2016, 18:52

Thanks, Elgin

Btw: the EmulateRecognition in your original post does not speak a text but simulates the recognition of a text. The corresponding command for Dragon would be the function RecognitionMimic("text") in the Dragon.DgnEngineControl object.

That's actually, exactly what I wanted was the equivalent of said script.

Listener:=ComObjCreate("SAPI.SpSharedRecognizer")
Listener.EmulateRecognition("Time Please")

Could you show me the equivalent of the Dragon NaturallySpeaking script?

Re: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Post by Elgin » 03 Feb 2016, 14:45

You can also get Dragon to speak a text.

Using Dragon's own scripting engine should work:

Code: [Select all]GeSHi © Codebox Plus

Listener:= ComObjCreate("Dragon.DgnVCmd.1") ; create Dragon's command object
Listener.Register("", 1) ; register it
Listener.ExecuteScript("TTSPlayString ""This is a test. Did it work?"", """"",0) ; ececute the command TTSPlayString. See Dragon help for details. Watch out for the double quotes in the string!
Sleep, 10000 ; or do something else...
Listener.Unregister() ; unregister your object when you don't need it anymore


In theory you should also be able to use the DgnVoiceTxt or VTxtAuto COM-interfaces directly, but at least on my machine they're not registered by default, so the above is probably the safest way to do it.

Btw: the EmulateRecognition in your original post does not speak a text but simulates the recognition of a text. The corresponding command for Dragon would be the function RecognitionMimic("text") in the Dragon.DgnEngineControl object.

Re: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Post by RickC » 03 Feb 2016, 09:58

You don't actually need DNS. Try this using just AHK and SAPI:

Code: [Select all]GeSHi © Codebox Plus

ComObjCreate("SAPI.SpVoice").Speak("Hello. This is an example of using speech.")

Re: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Post by scriptor2016 » 02 Feb 2016, 20:12

I use Dragon Naturally Speaking with ahk, so I use voice my commands to run the scripts. But I've never had DNS actually "speak" to me... do you mean have DNS read out loud a passage of text, for example? If so, there are other options as well to do this. Maybe if you clarify what you want to do I could give you a bit more info

Re: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Post by aShai » 01 Feb 2016, 18:54

Thanks, lifeweaver for the reply.

Re: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Post by lifeweaver » 01 Feb 2016, 14:04

Hi aShai,

I wasn't able to find much information but it looks like Dragon Naturally Speaking has COM interface, which is good news.
Here, and here are two examples of using this interface with AutoHotkey. The second examle has the more recent syntax, you don't want to use the 'COM Standard Library' mentioned.

Perhaps you can track down elgin for more help.

Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Post by aShai » 31 Jan 2016, 02:39

Can you make Dragon NaturallySpeaking talk using an autohotkey script?
If so, how?

BTW, I was able to achieve this with WSR using this script:

Listener:=ComObjCreate("SAPI.SpSharedRecognizer")
Listener.EmulateRecognition("Time Please")

Not so With Dragon NaturallySpeaking.

Any help will be appreciated, Thanks.

Top