TBC Macros and Extensions

 View Only

TML - Voice Commands

By Gary Lantaff posted 12-02-2019 14:31

  

If you want to play around using your voice to execute TBC commands, just run TMlStatus and download the macro VoiceCommand. The macro is being provided "as-is" (but it's fun to play with)

 

It's actually a simple macro that loads every TBC command into the default speech engine of windows. I tested it using Windows 10 but it should work with older versions. The default voice input device is used and there are no voice settings defined in the macro.

 

When the speech engine hears a "match", it calls a method in the macro and the macro starts that command. 

 

Four other "commands" are added to the command list.

1) "OK" will cause the default accept button to be "pressed"

2) "Cancel" will cause the default cancel button to be "pressed". This is true even when the button label says something else (like "Done" or "Close")

3) "Tab" will cause the focus to move to the next control.

4) "Shift Tab" will cause the focus to move to the previous control.

 

The macro only looks for TBC commands. It can not be used to fill in the data for any control  (so you can't say "12.5" and expect the number to be filled in)

 

When the command starts up, you should see a small window that defines the command options.

The slider can be used to specify how close to a match the voice command needs to be in order to execute the command. The default is 0.80 (80 percent). Only matches higher than this tolerance will be executed.

 

If you want to disable the voice recognition but leave the command running, you can uncheck the "Enable voice commands"  checkbox. 

 

If the "AutoStart" checkbox is "checked", then the macro will start when TBC starts.

 

If you speak a command the speech engine doesn't recognize, then you will see;

               "Rejected: [<cmd>]" in the commands window.

If you speak a command the engine matches to one of the commands in TBC, then the window shows the name of the command and the match confidence. If the confidence is greater than the match tolerance defined using the slider, then the command will be executed.

 

Some commands are not enabled all the time. If you speak the name of a command that is not enabled, the command is ignored.

 

Have fun....

6 comments
4 views

Permalink

Comments

03-15-2020 15:39

I just tried it and it works. Now if it would input numbers.

12-06-2019 17:23

Works could be an awesome tool - but I'll need to buy a microphone (and train software to recognise my dulcet tones). My work colleagues will be confirmed in their views of my sanity

12-05-2019 12:09

Works great thank you 

12-04-2019 18:48

Thanks Gary,

 

Admittedly I just realised my tower PC doesnt come with a mic

Once i bluetoothed my headphones the command launches fine.

 

I have tried a few basic commands such as:

  • New Project
  • Command Window
  • Projecting Settings
  • Coordinate System Manager

 

They all execute well, except I have noticed a few execute twice after a single voice command opening two identical windows.

 

Anyway pretty cool

 

Sure this will improve with user feedback and time

12-04-2019 09:39

It seems a few windows systems require the source input (your microphone) to be set before adding the commands. I made a small change to the macro for this issue.

 

Try getting the latest version and see if that works for you.

12-04-2019 01:06

Hi Gary,

 

Was pretty intrigued on this one, heading towards the uncanny valley.

This would be pretty cool for some demos.

 

I am having a few problems running the macro.

I am on W10 v1909 and get this error:

 

 

Any ideas?

 

Cheers

 

Gareth