Voice activation software to run macros?

TedX

Board Regular
Joined
Apr 18, 2021
Messages
122
Office Version
  1. 365
Platform
  1. Windows
One of the reasons I like creating macros to speed things along in Excel is that I'm lazy. I assume I am not alone in that department 🤪

So my question is, is there any voice activation software around (even in Beta) that would let me say commands that would run macros?
 
I just took the 'three' subroutine out, and I currently have what's in the image below. It works 100%, this is where I left off yesterday. Now I want to simply add a second routine, otherwise, all the coding has been just for one command, which is hardly worth it. I want about 12 subroutines, I really don't care what they are called because the subroutine can simply call another macro, like the working example below shows. When I say one, a new instance of a worksheet opens for me, which is all preformatted. This is so cool, but I would like another 11 voice commands to work as well as this one.

1670739660209.png
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
There is a point to be made about the size of your workbook, and how you'd be better off separating out: (1) the program your working on; and (2) the tools you're using, not least because with 149 modules, and who knows how many procedures, I'm surprised you're not bumping into conflict errors more often.

There is also a point to resolved about you not being able to find "Sub three" when you search for it, because that's not really 'a thing'. Do you have any of the find dialog settings left on maybe? One very quick and easy way of finding the procedure is to mimic what Application.Run does by literally doing that manually in the Immediate Window, and executing it. So:

VBA Code:
Application.Run "three"

And see what happens. Alternatively, you could execute Application.Goto "three", which will take you straight to the procedeure (assuming there is only one named that in your workbook, and you don't have any modules called 'three'... which, as I type this now, is starting to feel like its becoming the frontrunner of possible culprits. But the absolutely surefire way of finding the procedure is to preface it with the name of the module! So:

VBA Code:
Application.Run "Module148.three"

At this juncture, I would suggest giving your modules and subs more meaningful names. It makes sense to use simple words for the speech recognition commands, but the actual names of subroutines don't have to be same as the command.
 
Upvote 0
There is a point to be made about the size of your workbook, and how you'd be better off separating out: (1) the program your working on; and (2) the tools you're using, not least because with 149 modules, and who knows how many procedures, I'm surprised you're not bumping into conflict errors more often.

There is also a point to resolved about you not being able to find "Sub three" when you search for it, because that's not really 'a thing'. Do you have any of the find dialog settings left on maybe? One very quick and easy way of finding the procedure is to mimic what Application.Run does by literally doing that manually in the Immediate Window, and executing it. So:

VBA Code:
Application.Run "three"

And see what happens. Alternatively, you could execute Application.Goto "three", which will take you straight to the procedeure (assuming there is only one named that in your workbook, and you don't have any modules called 'three'... which, as I type this now, is starting to feel like its becoming the frontrunner of possible culprits. But the absolutely surefire way of finding the procedure is to preface it with the name of the module! So:

VBA Code:
Application.Run "Module148.three"

At this juncture, I would suggest giving your modules and subs more meaningful names. It makes sense to use simple words for the speech recognition commands, but the actual names of subroutines don't have to be same as the command.

I couldn't agree with you more Dan and I got rid of 'three' entirely and used a much better name of 'roll', which is meaningful to me. Then BOOM 🔥🔥🔥🔥🔥🔥 it worked flawlessly. After making sure my microphone was on and listening, I ran the voice listener subroutine (InitVoiceListener) in module 149 as shown in the final (yes, the very last image) and then I boomed out in a beautiful Aussie accent that magnificent word 'roll', this called into play around about a dozen smaller macros which were called by a single macro which wiped everything out of my worksheets ready for the next day.

Then I eloquently spoke that magnificent word 'one', which open another worksheet over the top of the currently open worksheet, ready for me to transfer the new day's data into it. That macro also calls into play another 4 macros. Let me tell you this, when I first started doing this project, about 3 years ago, to do, up to this point manually was taking me more than 2 hours, if I had 6 meetings to do, which there are always 6 or more on a Saturday and Wednesday. I have through the power of VBA slowly gotten that time down to less than 1 minute and now, I don't even have to click a mouse or tap a keyboard, I just say a few words.

No one should ever say to me that VBA and Excel aren't the best programs in existence, because they will regret it :ROFLMAO::ROFLMAO:😂

Thanks to everyone that helped - this thread is now, well and truly closed, but of course available for others to read if they wish to harness the power of speech recognition to run macros in Excel 💘

1670746111302.png
 
Upvote 0
I only got aware of this thread today, and I see I am a bit late. If you will use speech recognition, make sure you perform speech training ideally couple of times.

How I used SpRec is a bit different. I used InProc instead of shared. iirc in shared Excel itself/or Windows can be listening to commands.
Another difference is I used an XML file for grammar rules. It is different than free dictation, and you need to use certain patterns.

One thing I noticed was as soon as you enable recognition it starts to listen even to surrounding sounds, so it can recognize someone else or a TV etc. Even it doesn't recognize, it is possible to interfere with what you are saying. So I used a push-to-talk kind of feature. Any form of recognition is dismissed unless CTRL key is pressed.

Also the likelihood of a successful recognition increases if you use 2 or ideally 3 words.

You have a very simple scenario at least for the moment, but it gets complicated fast when you start to pass also parameters uttered in human language :) Pasting how a grammar rule XML looks like (they are of course only meaningful for my own app).

1671208248881.png
 
Upvote 0
I only got aware of this thread today, and I see I am a bit late. If you will use speech recognition, make sure you perform speech training ideally couple of times.

How I used SpRec is a bit different. I used InProc instead of shared. iirc in shared Excel itself/or Windows can be listening to commands.
Another difference is I used an XML file for grammar rules. It is different than free dictation, and you need to use certain patterns.

One thing I noticed was as soon as you enable recognition it starts to listen even to surrounding sounds, so it can recognize someone else or a TV etc. Even it doesn't recognize, it is possible to interfere with what you are saying. So I used a push-to-talk kind of feature. Any form of recognition is dismissed unless CTRL key is pressed.

Also the likelihood of a successful recognition increases if you use 2 or ideally 3 words.

You have a very simple scenario at least for the moment, but it gets complicated fast when you start to pass also parameters uttered in human language :) Pasting how a grammar rule XML looks like (they are of course only meaningful for my own app).

View attachment 81056
Oh wow. This is awesome. I'm very glad I remembered to tag you in this! I may pester you with follow up questions. Thank you!
 
Upvote 0
I only got aware of this thread today, and I see I am a bit late.

Hi Gokhan, your contribution is amazing, it's well above my level, but I can sense it's an awesome bit of code. As for your tips yes, you are accurate. Since I got mine working, I did in fact hammer the learning, I added quite a few words individually saying them over and over, listening to how I sounded. It's funny how, I would say some words differently than normal simply because I was recording it. A form of self-sabotage perhaps, the mind is weird, well my is anyway :ROFLMAO: 😂 :ROFLMAO:

I got the project I have, fully sound operational, I can speak through it, running macros doing a variety of tasks, it's super cool and anytime I get a visitor, I go into an academy award performance saying words and stuff just happens on the screen, these 'ordinary' people think I'm a magician. Yes, I know I'm a flipper but heck I'm having fun showing off 🤪
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,050
Members
449,206
Latest member
Healthydogs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top