Microsoft Speech SDK 5.1 (SpeechSDK51.exe):
Make sure your Control Panel > Speech settings are OK, specifically the microphone test.
Run "sh4speech.bat" to start the program. Edit this file to set your resolution (default is 1024x768).
Printing the Reference Card is suggested as well.
To add new voice commands, use Excel (or notepad) to copy and paste entries in voice_commands.csv as a new row/line, and change the third column that has the voice command.
Continue reading for more about tuning your speech recognizer and other settings that will improve recognition a bit, especially if you're getting no recognition on some commands or incorrect recognitions.
sh4speech is a voice command system for SH4. The voice recognition is astonishingly good due to the fact that it only tries to match known words rather than complex guesswork against the entire english dictionary.
The configuration files are fully localizable into any language.
It could be adapted to other games, and while the design is generalized in this sense, that is not its purpose. I was just trying for a proper, scalable design.
After only a few minutes of play, you will be hooked. Issuing orders like "hard to port" while shooting with the AA gun allows you to keep shooting!
And for any skeptics, dare I say, the voice recognition is better than Enigma. Maybe I just didn't train it properly with that game, so I've included a lot of training and tuning information here.
COMPATIBILITY WITH TRIGGER MARU OR CUSTOMIZED SH4 KEYBOARD CONFIGURATIONS
sh4speech is designed to be used with the default SH4 key configuration.
Trigger Maru, and possibly other mods, change the commands.cfg file. The commands.cfg file can be restored from the !BACKUP stored by JGSME to fix sh4speech, I don't know if that will have any effect on Trigger Maru or any other mods that have custom commands.cfg files. Of course you could go and change all the key commands in the CSV as well but this is really designed for the default key configuration. Trigger Maru has some additional command bar items that are supported by sh4speech.
See the fill Change Log here.
STARTING A GAME
Upon starting a new game, loading a saved mission, or entering and leaving port, you should check a few things and speak a few initialization commands to set up the system:
"setup 6 tubes" or "i have 6 tubes" (supports, 4, 6, 8, or 10)
This tells me how many tubes you have so I can cycle them properly. You only have to do this at the start of a new game, not after using port or between missions, unless you actually upgrade to a new sub.
"reset tubes" or "reset all tubes" or "set all tubes closed"
This tells me that your currently selected tube is #1 and they are all closed.
"reset dials" or "reset all dials"
This tells me that the current state of the dials is the Telegraph (not the Knotmeter), the Compass (not the Rudder), and the Shallow Depth Dial (not the Deep Dial).
After doing this, leave the dials alone with the mouse, as well as the tube selectors. If you must touch them, just put them back to where they were before attempting to use any voice command that accesses them.
TRAINING YOUR SPEECH RECOGNIZER
The biggest problem I found during testing is that any little noise might get matched as a word. With just a little tuning, I was able to carry on a conversation for 10 minutes without it picking up anything, and only when I obviously said "dive" did it recognize that.
Open Control Panel > Speech.
Choose language "Microsoft English Recognizer 5.1" (sorry, english only for now until someone localizes the command files).
Based on my testing, you should set Pronunciation Sensitivity about 1/3rd from the RIGHT, and Accuracy vs. Recognition Time to about 1/3 from the LEFT.
Keep this in mind when you test sh4speech, as you may need to adjust it based on the behavior of your microphone, voice, ambient sound, accent, etc.
Click "Configure Microphone and make sure that's OK. The levels should be in the green.
Click "Train Profile". I'd suggest doing at least two or three training sessions which will take about 30 minutes.
FURTHER TUNING OF YOUR MICROPHONE
Adjusting the gain is key to getting good recognition. I use a very high quality microphone and when I record and playback, it is very quiet. This seems generally good since it prevents ambient noises and jerks in the room shouting "crash dive ahhaha!" from getting picked up.
When you playback, you should hear very little of the hissing "air" that is often picked up, and while you might have to crank your volume to hear it, your voice should be clear. Test "psst" sounds to see if they cause you to blow on the mic which often results in a staticy interference. The Configure Microphone part of the Speech control panel tries to help tune this for you.
You can start > run > sndrec32 to do some quick and dirty tests. Be sure to File > New between each one, otherwise it strings them together. This is not the highest quality recorder, it only does PCM 22.050 KHz 16-bit Mono, which isn't great. Try to use whatever came with your sound card. If you can't find anything good, buy a Creative X-Fi. Those cards own.
See RUNNING SH4SPEECH IN TEST MODE below to dial this all in perfectly before running it in a live game and accidentally blowing your ballast tanks.
See the CSV File Structure document to learn how the config files are set up.
Inigo Surguy for the python SAPI listener
Piotr Kaluski for Win32::GuiTest
- Fraggulus (sorry I forgot you earlier!)
- CaptainCox (I'm sure your wife will understand) (wow that actually sounds kind of gay lol)
Dave Lim for helping me compile the python script to EXE
Larry Wall for Perl
Whoever wrote Python
Microsoft for SAPI
The Romanian Dev Team for SH4
Released under the Creative Commons license.