Print Page | Close Window

Push to Talk for WSR

Printed From: MSSpeech-Forum
Category: Windows™ Speech Recognition Forums
Forum Name: New Users & General Questions
Forum Description: Ask questions, give and get answers.
URL: https://www.msspeech-forum.com/forum_posts.asp?TID=238
Printed Date: 27/Nov/2024 at 8:34am
Software Version: Web Wiz Forums 12.02 - http://www.webwizforums.com


Topic: Push to Talk for WSR
Posted By: molkemon
Subject: Push to Talk for WSR
Date Posted: 13/May/2011 at 7:07pm
I wasn't exactly sure where to post this, but I guess I'll just leave it here for now.

--

So, I figured that most of you probably don't know about this yet, so for your information:

The Basic Windows Speech Recognition has a hotkey that will toggle the microphone between sleeping and listening. This combination is

Ctrl + Windows Key

So far, so good. If you have the Windows Speech Recognition Macros running, this behaviour gets modified. It now switches between off and listening. Also, and more importantly, if you press the combination for more than 500ms, it will exhibit a "push to talk" function, as in it will listen as long as you are pressing the buttons down and then go back to offline. So far, so awesome. Now Ctrl + Win isn't the best possible hotkey so I was looking for a way to modify it, and I eventually came up with something.

First, you need to download and install AutoHotkey: http://www.autohotkey.com/download/
This is a very powerful tool that will let you create complex macros for various hotkeys (e.g. insert a whole lot of text by pressing some key combination), and will also let you substitute keys on your keyboard with each other (e.g. if you press b, it will type a if you want to).
There is a comprehensive help file that comes along with the tool if you wanna know more about it, but for our purposes, here is the script that will function as our push to talk button:

~Xbutton2::
Send {LCtrl down}+{Lwin down}
KeyWait, Xbutton2
Send {LCtrl up}+{Lwin up}
return

Replace both Xbutton2 instances with the key you actually want to use (check the Auto Hotkey helpfile for a list of all possible keys).

That's it, thats all that it takes. Xbutton2 is the 5th mouse button if you happen to have such a thing, but basically you can use any key instead of Xbutton2 (eg. you could use Insert or Home, or Tab. IMPORTANT: Unless you put that tilde ( ~ ) in front of the Key you want to assign, it will not retain it's original functionality. WITH the ~, it will do BOTH: act as the push to talk button AND the keys original purpose. It's up to you if you want that or not of course. If you remove the tilde, the original function of the key will be disabled as long as the AutoHotkey script is running. ).

This script emulates the exact behaviour of the Ctrl+Win combination: if you press the key/button only shortly, the microphone will toggle between listening/offline. If you hold down the key/button, it will listen as long as its pushed down and go back to offline as soon as you release it.

Best regards.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.02 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net