KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Programatically creating commands
Topic Summary: Is it possible to create Dragon Naturally Speaking commands programatically?
Created On: 02/09/2012 12:15 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Programatically creating commands   - Pranav Lal - 02/09/2012 12:15 AM  
 Programatically creating commands   - Lunis Orcutt - 02/09/2012 03:25 PM  
 Programatically creating commands   - Pranav Lal - 02/09/2012 07:26 PM  
 Programatically creating commands   - bk82 - 02/09/2012 05:19 PM  
 Programatically creating commands   - Pranav Lal - 02/09/2012 07:29 PM  
 Programatically creating commands   - R. Wilke - 02/09/2012 07:38 PM  
 Programatically creating commands   - Pranav Lal - 02/09/2012 11:33 PM  
 Programatically creating commands   - R. Wilke - 02/10/2012 01:27 AM  
 Programatically creating commands   - mdl - 03/17/2012 01:19 AM  
 Programatically creating commands   - Pranav Lal - 03/18/2012 12:24 PM  
 Programatically creating commands   - mdl - 03/30/2012 11:54 PM  
 Programatically creating commands   - mdl - 03/31/2012 12:03 AM  
 Programatically creating commands   - mdl - 03/31/2012 12:14 AM  
 Programatically creating commands   - mdl - 03/31/2012 12:18 AM  
Keyword
 02/09/2012 12:15 AM
User is offline View Users Profile Print this message


Pranav Lal
Senior Member

Posts: 145
Joined: 10/02/2006

Hi all,

 

Can I create Dragon Naturally Speaking commands programatically? I know that these commands can be created as XML files and then converted to the dat format by the xmltodat (not sure of the right name) utility. Is there any documentation on this?

 

Are there any components that do this in managed code or that use COM?

Pranav



-------------------------
 02/09/2012 03:25 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 22599
Joined: 10/01/2006

Are you referring to creating commands by voice? If so, we refer to these types of commands as VerbalBasic which are already included in KnowBrainer 2011 in the patented verbal command collection section. However, you could optionally create your own verbal toolbox within DNS Pro Command Browser, for personal use, but the process took us 6 months.

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


Click KB 2012 REV D to Download a 30 Day Evaluation of KnowBrainer 2012 


 


 


 

 02/09/2012 07:26 PM
User is offline View Users Profile Print this message


Pranav Lal
Senior Member

Posts: 145
Joined: 10/02/2006

Hi Lunis,

No I am not refering to creating commands by voice. I want to create commands from my program which is written in visual basic .net.

 

Pranav



-------------------------
 02/09/2012 05:19 PM
User is offline View Users Profile Print this message


bk82
Top-Tier Member

Posts: 215
Joined: 08/04/2007

I've once created - or, to be honest - have someone else create an Excel macro for me that created an XML file just like the one used by Dragon. But it was not for Dragon. But the principle is the same.

I suspect you could use any decent programming language to create the kind of XML file that Advanced Scripting can import.

As for the structure of the XML command file, I suggest doing a few XML exports of your existing commands and see how they are structured. It should not be that hard to re-create their structure. 



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

DNS 12 Pro, Medical, Premium - German, English, French - Dragon Dictate 3.0, dns.comfort


 


Core i7 950, Windows 7 Ultimate 64-bit, Intel Core i7 950, 12 GB RAM, L2 2MB; Mic: Jabra Chromo NC 2400 USB.


 


www.in2comp.ch 

 02/09/2012 07:29 PM
User is offline View Users Profile Print this message


Pranav Lal
Senior Member

Posts: 145
Joined: 10/02/2006

Hi Bk82,

 

Yes, I have tried creating a command by looking at some samples but there is an error in my xml file and I can't tell what it is so was hoping for a schema to validate against. Documentation with samples would help to since I could look at that and correct my error.



-------------------------
 02/09/2012 07:38 PM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 4391
Joined: 03/04/2007

Can you run your program successfully on a command exported from Dragon in XML format?

Rüdiger

 



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

Well, it's past the point where we can make any changes in the code, but we can still make changes to the Easter Egg!

 02/09/2012 11:33 PM
User is offline View Users Profile Print this message


Pranav Lal
Senior Member

Posts: 145
Joined: 10/02/2006

Hi Rüdiger,

 

An interesting thought. However, my program has to create the commands and then import them into Dragon Naturally Speaking so there is not much running to do with an existing command file.

 

I took the XML from an existing command and am generating that with suitable modifications.

 

 

Pranav



-------------------------
 02/10/2012 01:27 AM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 4391
Joined: 03/04/2007

Why would you want to use a program for that? - Please don't answer.

Quote:
I took the XML from an existing command and am generating that with suitable modifications.

So the problem is with any (or all) of the "suitable modifications". Why don't you do one at at time to determine which?

Since you asked for it, there is no such things as samples and a documentation.

Rüdiger

 



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

Well, it's past the point where we can make any changes in the code, but we can still make changes to the Easter Egg!

 03/17/2012 01:19 AM
User is offline View Users Profile Print this message


mdl
Senior Member

Posts: 130
Joined: 04/18/2009

yes.  I do this all the time with Vocola.  In particular, I have a number of Ruby scripts that generate Vocola include files with things like lists of directories and email addresses.

 

in the past, I built a mini-Vocola compiler that generated XML files of DNS Advanced Scripting commands, which I could load into the DNS Command Browser.  This was a big pain, however,as you had to control the GUI to delete the previous commands and then import the new ones.  I recall issues with the Command Browser failing to update changed lists correctly as well.

 

 

 03/18/2012 12:24 PM
User is offline View Users Profile Print this message


Pranav Lal
Senior Member

Posts: 145
Joined: 10/02/2006

Hi MDL,

 

This is the kind of response I have been waiting for. I am parsing some screen reader related script files and need to convert the output into commands. I have looked at vvocola once before but have not used it extensively. Could you share some code to generate a command or should I look at ruby?

 

Pranav



-------------------------
 03/30/2012 11:54 PM
User is offline View Users Profile Print this message


mdl
Senior Member

Posts: 130
Joined: 04/18/2009

Sorry for the delay, I only scan this group occasionally.

During a Vocola include file is fairly easy as the syntax you need to generate is basically:

 

<listname> := (

written = spoken |

...

written = spoken );

 

the Ruby code mostly makes things prettier.

 03/31/2012 12:03 AM
User is offline View Users Profile Print this message


mdl
Senior Member

Posts: 130
Joined: 04/18/2009

apparently I can't reply to my own post.  anyways, I'm attaching some Ruby code for you to look at.


Vocola_quoting.rb
Vocola_quoting.rb  (15 KB)
list_generator.rb
list_generator.rb  (15 KB)
priority_list.rb
priority_list.rb  (15 KB)

 03/31/2012 12:14 AM
User is offline View Users Profile Print this message


mdl
Senior Member

Posts: 130
Joined: 04/18/2009

it's pretty easy to convert from the standard Dragon list format as used by Advanced Scripting to Vocola's form.  Attached is a simple piece of code to do this using the previous code.

 Example:

 

 ts-rhel6 [124]% cat text
1\hello
there
2\two
3
first

ts-rhel6 [125]% ruby convert.rb text

<text> := (
         3
      |  first
      |  hello = 1
      |  there
      |  two   = 2
);

(you can't tell here but the ='s are lined up)

 



convert.rb
convert.rb  (15 KB)

 03/31/2012 12:18 AM
User is offline View Users Profile Print this message


mdl
Senior Member

Posts: 130
Joined: 04/18/2009

anyways, that's how to generate a list problematically.  Similar tricks will let you generate commands.

If you create or update a .vcl file, Vocola will (re)load it at the start of the next utterance.  Updates to .vch files only don't cause reloading.

I will be out of town next week.

 

Statistics
27364 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 3 users logged in.
The most users ever online was 2028 on 04/05/2013 at 07:36 PM.
There are currently 90 guests browsing this forum, which makes a total of 93 users using this forum.

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