Thread Tools Display Modes
05-18-06, 03:08 PM   #1
Dhargo
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2005
Posts: 32
Voice commanding WoW on a budget

Recently someone posted on the Blizzard UI forums regarding voice commands for WoW - her brother had returned from Iraq without the use of his arms. My only previous experience with voice command products was Game Commander 2 - and I can heartily recommend to stay away from it.

In my searches for options I discovered that, for WinXP users, there is an essentially free option: Inigo Surguy's SpeechGUI - a small wxPython program that uses WinXP's SRE (speech recognition engine) to allow voice commands.

My results with it have been excellent, considering the software is free, leaving only the cost of a microphone (more on that later). WinXP's SRE has very good recogniton with 20+ phrases (the highest I've gone so far) with NO confusion between any 2 of the phrases (unlice GC2 which confused them all the time ). These results were obtained with about 15 minutes of training (just 2 of the training readers done).

To use this, you'll need the following things:

1. WinXP SRE. When you've installed it - go to your control panel -> speech and do at least one training reader.

2. Python - there's an installer for Itanium machines as well.

3. wxPython GUI library. You might try this first, as it might contain the python installation - I already had python installed when I got it, so I don't know.

4. pyTTS - Makes it easy to work with SAPI's TTS stuff.

5. Inigo Surguy's SpeechGUI - the link is below the example code. This app has a couple of small problems: If you empty the command list, it generates errors in the console window and the commands to put the app to sleep and wake it up weren't (fully) implemented. The first issue is truly a non-issue, since it just generates a bit of spam to the console window if you happen to empty the list. The second one is easily remedied:

by placing the following code right before the try at line 90:
Code:
        if not app.turnedOn:
            app.turnOn()
            say("Listening")
            return
and by adding a command "Go to sleep" with the following code:

Code:
app.turnOff()
say("Sleeping")
You will be able to suspend listening for anything but the command "Turn on".

Which brings us to how to use it - when you run SpeechGUI.py 2 windows will open:

1. The console window to which print commands will print.
2. The GUI to add commands and the code associated with them. SpeechGUI simply executes a small piece of python code when you speak the associated command. Inigo included wrappers to a couple of useful items, including "sendKeys" and "say".

With sendKeys() you can send a keystroke to the program that currently has focus. say() uses SAPI's TTS to speak the string sent to it. NOTE: say is syncronous, and will not return until it is finished speaking - any commands following it will not execute until the phrase is finished.

For instance - the test commands I put in looked like:

Code:
"page one" 
  sendKeys("+1")
  say("page one")
That sends shift+1 to the current application (in a default WoW setup, we just switched to page 1)

and
Code:
execute one
  sendkeys("1")
for executing an action button.

I also had Nina's selection ring running nicely with it -

"selection ring panels" brought up my ring of UI panels (quests, talents, inventory, character, spellbook et. al.) and a quick mouse wheel spin followed by "execute selection" to make it work. This required a little editing of Nina's bindings.xml, but kind of fun.

Things to consider:
Tem brought up the idea that, having a python script inject keystrokes may be against the EULA. Keep in mind that controllers such as the Nostromo N52 and the extra keys on the Logitech G15 do not directly send keystrokes - but rather send the hardware event to the driver which inserts the defined keystrokes into the input stream. I can't see how this can be construed differently - as long as you limit yourself to 1 keystroke per command.

On the subject of microphones:

A noise cancelling mic is a must for voice recognition. Unfortunately for me, there are very few out there without stereo headphones on them (I prefer to listen to my speakers and just have a lightweight mic on the headset - but that's me ) However, apparently the Radio Shack knock-off of a premium brand mic is pretty good (it runs $40). If you don't mind listening to the game through headphones - the altec lansing ones I just got for $11 (free shipping) are ok, with the caveat that the boom is too long and need quite a bend to put the mic at the corner of the mouth (which is the best place for it.

Well - I think that's everything. Keep in mind, this has a lot more functionality than this - Inigo included functions to allow easy opening of apps and browsing to a specified URL in IE.

EDIT (06/07/2006) - I found a very inexpensive microphone a couple of weeks ago that works very well. It's the Labtec LVA-7330. I got it for $10, with free shipping. It has no headphones (which I like) and the boom is short enough that the mic sits to the side of my mouth instead of in front getting hammered by percussives. The only problem I have is that it's a little tight, and after a few hours is not as comfortable as it could be.

Last edited by Dhargo : 06-07-06 at 10:32 AM.
  Reply With Quote
05-18-06, 06:34 PM   #2
incith
A Murloc Raider
 
incith's Avatar
Join Date: Dec 2005
Posts: 8
I won't make use of this, but a very well written guide deserves praise. Especially for whom you are trying to help. Well done, sir.
  Reply With Quote
06-25-07, 03:06 PM   #3
rob1101
A Cyclonian
 
rob1101's Avatar
Join Date: Dec 2006
Posts: 40
well done indeed
  Reply With Quote
08-21-08, 07:09 PM   #4
Mysticell
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 5
This is definitely a very well written guide and for a good cause, keep up the great work!
  Reply With Quote
05-12-09, 07:14 PM   #5
Malthorn
A Kobold Labourer
Join Date: Oct 2008
Posts: 1
Originally Posted by Dhargo View Post
I also had Nina's selection ring running nicely with it -

"selection ring panels" brought up my ring of UI panels (quests, talents, inventory, character, spellbook et. al.) and a quick mouse wheel spin followed by "execute selection" to make it work. This required a little editing of Nina's bindings.xml, but kind of fun.
What mod is this? It sounds like something I've been thinking about.
  Reply With Quote

WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » Voice commanding WoW on a budget

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off