KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Is it possible to call dgnEngine from C# to have Dragon run a command?
Topic Summary: Kind of like running HeardWord from an external program
Created On: 01/03/2021 01:56 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 01/03/2021 11:10 PM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 718
Joined: 11/05/2015

Thank you everyone, your input has helped. I already do input simulation with the virtual key codes (which is not the same as trying to harness the library of "things" that a user's library of commands can do. Rob, the COM example you posted is right on the money too - that's exactly how you do it in C# code (syntax is a bit different, of course). There are many examples on the net. Probably the key line of code that answered my question was the "DgnEngine.RecognitionMimic("text") line. (Thank you for reminding me, Rob.) I remember reading about the Create, DgnEngine.Register, mimic, Unregister sequence on the forum somewhere long ago, now that I see it in front of me.


I know some other people on the forum here have a regular practice of using external programs (like DragonEmulate or whatever) to feed commands into Dragon to make it think it "HeardWord" something. It must be a useful practice since they do it, so I was just thinking about it. I think Edgar passes dictation to Dragon to his program (to process the words) and then back to Dragon to get a functionality boost. If any one makes huge use of this pattern, I wonder if you would comment on the big benefits of the approach?


I was just contemplating what benefits I could imagine if I did something like that, and posted here just to find out how easy it would be. (Easy, it looks like.) It's almost like you could treat Dragon as an intelligent "non-voice assistant for a natural-language scripting language." Just put your almost-natural-language "commands" in a text file and feed the file to Dragon as a scripting engine. Presto! Easier than learning a programming language, I suppose. :-)



-------------------------

Win10/x64, AMD Ryzen 7 3700X, 64GB RAM, Dragon 15.3, SP 6 PRO, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Klim and JUKSTG earbuds with microphones, 3 BenQ 2560x1440 monitors, Microsoft Sculpt Keyboard and fat mouse

 01/04/2021 12:08 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1123
Joined: 04/03/2009

Originally posted by: kkkwj   that's exactly how you do it in C# code (syntax is a bit different, of course).

Post (or link to) some code, please. I too have the same reaction to learning how to tame the Dragon®.



-------------------------

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 01/04/2021 02:59 PM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 7537
Joined: 03/04/2007

Originally posted by: Edgar
Originally posted by: kkkwj   that's exactly how you do it in C# code (syntax is a bit different, of course).

 

Post (or link to) some code, please. I too have the same reaction to learning how to tame the Dragon®.

 

Edgar, and everyone else posting to this thread: Stop wasting your time even thinking of it.



-------------------------



No need to buy if all you want to do is try ...

DragonCapture KB Download (Latest)
DragonCapture Homepage

Statistics
32000 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 1 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 508 guests browsing this forum, which makes a total of 509 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2021 FuseTalk™ Inc. All rights reserved.