SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 07-28-07, 05:28 PM   #1
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default [REL] sh4speech - voice command for SH4

shSpeech - Voice Command for Silent Hunter 4 by minsc_tdp

sh4speech is a voice command program for Silent Hunter 4, but could be adapted to other games (and has been adapted to SH3 now!) It currently supports everything the game can do, allowing you to issue all orders completely hands-free, which frees up your mouse to only manipulate the cameras and periscope, map, and other things that traditionally did not involve spoken orders.

It is extremely quick, responsive, reliable, and the recognition is great if you follow the readme and spend a few minutes training your speech system and if you adjust your microphone often. The first time you hear someone bark "Yes sir!" in response to an order you barked yourself at your crew, your whole SH experience will change forever!

Downloads
v2.55 ***LATEST GOOD VERSION*** aka "DON'T STOP BELIEVIN' RELEASE
Download page:
http://knepfler.com/shSpeech

Silent Hunter 3
TomcatTwo modded this to work with Silent Hunter 3. To be honest, he put my work to shame! He added a lot of commands, even in German, and his documentation and immersion level is outstanding! Check it out here. I'm glad to have contributed the core technology to this awesome project. Congratulations TomcatTwo on an awesome release!

Latest Changes
June 29, 2016 (2.55 aka "DON'T STOP BELIEVIN RELEASE") - Added tmo 2.5 files by razark
Mar 01 2008 (2.54) - Fixed resolution scaling problems for TomcatTwo's SH3 mod (dials should work better in this one vs. 2.53)
Mar 01 2008 (2.53) - Fixed resolution scaling problems for TomcatTwo's SH3 mod
Feb 23 2008 (2.52) - Added "Pause Recognition" and "Resume Recognition" commands with underlying code support
Feb 19 2008 (2.51) - Added additional launch BAT files for left-handed users with underlying code support. Untested.
Feb 13 2008 (2.50) - Important adjustments made to location of voice_commands.csv and press_to_talk.csv files. If you have customized your CSV files, you must read the
ChangeLog! Other minor adjustments nobody will really notice.
Feb 9 2008 (2.25) - Fixes a problem where extra spaces at the end of voice commands would cause them to not work
Feb 5 2008 (2.24) - Adds support for multiple "hold keys", so you can do CTRL-SHIFT-ALT-X instead of being limited to only one, where you could only do CTRL-X or SHIFT-X or ALT-X. See the
ChangeLog for full explanation.
See the full changelog for a complete history of changes.

Docs
Readme
ChangeLog
Voice Command Reference Card

Videos
http://knepfler.com/shSpeech


URLs
Older Thread: http://www.subsim.com/radioroom/showthread.php?t=119039
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread

Last edited by minsc_tdp; 06-29-16 at 02:11 AM.
minsc_tdp is offline   Reply With Quote
Old 07-28-07, 06:43 PM   #2
corleonedk
Watch
 
Join Date: Jul 2007
Posts: 29
Downloads: 0
Uploads: 0
Default

I take my hat of for you m8,its late now but will test this tommorow..Well done
corleonedk is offline   Reply With Quote
Old 07-28-07, 07:01 PM   #3
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

I've been playing with it for more than an hour or so. DAMN is it fun! Hasn't misinterpreted a single command. Did a convoy kamikaze mission to stress it out. Only a very small number of commands went unheard, such as "hard to port" for some reason (probably due to the rough T sounds), but usually only when stuff on my boat was exploding, which I find very realistic! The recognition and response is very quick. I can't wait to set up shooting solutions with it. I'm playing with a nice mic about 1.5 feet from my mouth on the desk, and it works great even with 5.1 sound blaring throughout the room and my brother's stereo cranked in the next room.
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread
minsc_tdp is offline   Reply With Quote
Old 07-29-07, 01:19 AM   #4
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

Man - that was quick work - I can't wait to plow into this. I got my new PC built and so far so good on it (doubled fps on my SH4 benchmark ), but have run into a little trouble on one of the other 3 I'm upgrading so it will still probably be tomorrow night or later before I can get back and test this out. Early reports from the posts above are certainly encouraging.

Thanks for hanging with this
__________________
panthercules is offline   Reply With Quote
Old 07-29-07, 05:39 AM   #5
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

I've updated some critical install information to help you get things running. Let me know if there's any problems! God I'm so drunk right now I can't believe I'm posting this. The world is a total blur.

UPDATE: Now sober, I've tweaked the install instructions again and matched up the readme.txt instructions in the download with the instructions in the thread here.
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread

Last edited by minsc_tdp; 07-29-07 at 06:56 PM.
minsc_tdp is offline   Reply With Quote
Old 07-29-07, 01:56 PM   #6
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

Got some time while one of the other PCs is installing windows and was going to start playing around with this, but I'm confused by the install instructions. The first post above states:

2. Start > run > \sh4speech\install.bat. This will start the install for:
ActivePerl
...

I've downloaded ActivePerl and Active Python from the links you provided, but I haven't installed them yet (I'd already downloaded and installed the MS SDK thing a few days ago). Does the statement above mean that your bat file installs ActivePerl and/or ActivePython, or do I need to have installed ActivePerl and Active Python from the downloads first before I start running your install.bat file?
__________________
panthercules is offline   Reply With Quote
Old 07-29-07, 05:10 PM   #7
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

Sorry, no you have to install ActivePerl & ActivePython yourself. The install.bat was going to do it but it made the zip too big so I dumped them. Normal installs on both is fine. Same for the Microsoft SAPI 5 SDK. After installing all those, run install.bat.
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread
minsc_tdp is offline   Reply With Quote
Old 07-29-07, 05:32 PM   #8
ReallyDedPoet
Canadian Wolf
 
ReallyDedPoet's Avatar
 
Join Date: Jul 2006
Location: The one and only East Coast
Posts: 10,773
Downloads: 946
Uploads: 5


Default

Nice to have this option Great work here


RDP
__________________

Back in the Day



ReallyDedPoet is offline   Reply With Quote
Old 07-29-07, 06:02 PM   #9
Digital_Trucker
Silent Hunter
 
Join Date: Jul 2007
Location: The Peach State
Posts: 4,171
Downloads: 141
Uploads: 10
Default

Oh, boy! New toy to play with. Thanks!

My wife will be wondering who I'm yelling at soon.
Digital_Trucker is offline   Reply With Quote
Old 07-29-07, 07:18 PM   #10
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

Although I'm pretty sure I followed all the directions for the install, I've got a weird error problem trying to run this - when I try to do the test mode, I get the following message:

"Can't locate Win32/GuiTest.pm in @INC <@INC contains: C:/Perl/site/lib .> at go.pl line 9.
BEGIN failed--compilation aborted at go.pl line 9."

When I searched for GuiTest.pm, I found it in C:\sh4speech\libraries\Win32-GuiTest

There we an awful lot of questions during the ActivePerl and/or Active Python install processes - I just picked the default answers (except where I had to answer "yes" to the license questions), but maybe something went wrong anyway - any idea what this error is all about? Is there some trick to installing those Active things that maybe I missed?

[edit] - I re-ran the installs of ActivePerl and ActivePython (picked "repair" option in the latter) - everything seemed to go just fine. However, when I run either the test mode batch file or the main start batch file, I still get the same error message noted above. BTW - I did also do the step no. 3 in the notes on the first post (with the PythonWin editor) and all the other training/calibration steps before the first time I tried to run the batch files. Any ideas?

[edit] well, I also re-ran the sh4speech install.bat, just in case - everything appeared to go fine with that as well, but again I still get the same error message when I run the test mode

Any ideas welcome - would really like to give this a whirl
__________________

Last edited by panthercules; 07-29-07 at 07:33 PM.
panthercules is offline   Reply With Quote
Old 07-29-07, 09:51 PM   #11
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

Quote:
Originally Posted by panthercules
"Can't locate Win32/GuiTest.pm in @INC <@INC contains: C:/Perl/site/lib .> at go.pl line 9.
BEGIN failed--compilation aborted at go.pl line 9."
Look inside the install.bat and you'll see a line that looks like this:

ppm install \sh4speech\libraries\Win32-GuiTest\Win32-GuiTest.ppd

Put that into a command prompt and see what happens. It should install that module which is not installed on your system for some reason, see why when you run it manually. The results should look like this:

C:\Documents and Settings\you>ppm install \sh4speech\libraries\Win32-GuiTest\Win32-GuiTest.ppd
Unpacking Win32-GuiTest-1.50.5...done
Generating HTML for Win32-GuiTest-1.50.5...done
Updating files in site area...done
16 files installed


You might want to copy everything from C:\sh4speech\libraries\Win32-GuiTest into c:\temp and then try

ppm install \temp\Win32-Guitest.ppd

I've noticed it didn't install once from a deep folder but from there it was OK.

If all else fails, add this to the install.bat and run it again:

md \perl\site\lib\win32
md \perl\site\lib\win32\guitest
copy \sh4speech\libraries\Win32-GuiTest\GuiTest.pm \perl\site\lib
copy \sh4speech\libraries\Win32-GuiTest\lib\win32\guitest\*.* \perl\site\lib\win32\guitest


If it's STILL not workin do this on a command prompt and tell me the results:

perl -e "print join(',', @INC);"

Mine returns this, as should yours:
C:/Perl/site/lib,C:/Perl/lib,.
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread

Last edited by minsc_tdp; 07-29-07 at 11:17 PM.
minsc_tdp is offline   Reply With Quote
Old 07-29-07, 11:49 PM   #12
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

snakebit I guess - did all the steps you suggested above (thanks for the detailed instructions, BTW).

Every step along the way resulted in exactly the results you indicated should happen.

BUT, when I try to run the test mode batch file, I now get the following error:

"Can't locate Win32/API.pm in @INC <@INC contains: C:/Perl/site/lib .> at go.pl line 12.
BEGIN failed--compilation aborted at go.pl line 12"

So close, and yet so far

Any other suggestions?
__________________
panthercules is offline   Reply With Quote
Old 07-30-07, 12:24 AM   #13
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

Quote:
Originally Posted by panthercules
"Can't locate Win32/API.pm in @INC <@INC contains: C:/Perl/site/lib .> at go.pl line 12.
BEGIN failed--compilation aborted at go.pl line 12"
That's good, you've made progress, you got Win32-GuiTest to install and work. Line 12 invokes Win32-Api which the install.bat also should have installed.

What happens at a dos prompt when you type:

ppm install Win32-API

It should download the module from the 'net automatically and install it. I'm thinking maybe ppm isn't running for some reason. PPM is the Perl Package Manager that installs such libraries from an online repository called CPAN. ppm is completely self-sufficient and knows how and where to download stuff from and how to install it.

Worst case, you could download http://knepfler.com/Win32-API.zip and unzip it to \perl\site\lib\win32

Chat online with me if you're still stuck, I'll be around for a little bit. Early night though, 6 AM flight.

aim: erikdotla
icq: 1352055
yahoo: minsc_tdp
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread
minsc_tdp is offline   Reply With Quote
Old 07-30-07, 12:40 AM   #14
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

I hope nobody is discouraged from the install troubles some are having. I've never had trouble getting things to install with PPM on dozens of systems and I didn't expect any trouble here. I might consider an alternate install-manual.bat which manually puts the files where they need to be instead of relying on PPM. While there's no simple one-click EXE install for this, this is really not very painful compared to most applications out there, and it's worth the work so I hope you all give it a shot.

Seeing how this is really one of the very few applications that I've written, properly documented, and released to the public, I'm very proud of it even though it is relatively simplistic. I intend to support it indefinitely and I'll personally help anyone bring this online who is having trouble. Just post here!

I've also just updated the install.bat in the ZIP to hopefully take care of some of these problems, by trying every module install twice, once by calling PPM, and once by calling PPM specifically with the path where it should be (\perl\bin). Hopefully you've installed Perl to c:\perl or \perl (root of your windows drive.)
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread
minsc_tdp is offline   Reply With Quote
Old 07-30-07, 01:00 AM   #15
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

AWESOME - thanks for babying me through this - I tried just D/L'ing your program again to try the new install.bat file, but that didn't work.

then I tried the part where you said:

"What happens at a dos prompt when you type:

ppm install Win32-API"

That did the trick - it did what you said it should, and now running the test mode script calls up the window and starts recognizing the voice commands - unfortunately it's too late to stay up and play with it, but hopefully the hard part is over and it'll be fun time tomorrow night (darn RL work gonna get in the way first )

Thanks again - can't wait to take her for a spin

[edit] Couldn't resist checking out the voice command file for a bit to see how easy it is to insert your own commands - turns out it's remarkably easy. This is set up really well - kudos

I added several of my preferred ways of saying some commands, sometimes replacing some of the stock ones and sometimes adding some more, and they all worked flawlessly in the test mode - well done

Now, only one more request to bother you with before I head out to sea with this tomorrow - I tried to figure out how to change the key for "fire" from "Enter" to "Ctrl+Enter", since I don't use "Enter" to fire torps (a little lesson learned from accidental firings in SH3), but I wasn't sure about the interplay between the two key-related .csv files (may just be late and I wasn't thinking straight) and I didn't want to screw something up now that I finally got the test mode thing working. Any chance you could post an explanation on how to change the keystroke outputs for this? If not, I'll try reading it all again tomorrow night when I've gotten some sleep - it's probably in there already and I'm just missing it.

Thanks again for this - gonna be great fun, especially if/when you get the mouse/course and depth stuff working
__________________

Last edited by panthercules; 07-30-07 at 01:27 AM.
panthercules is offline   Reply With Quote
Reply

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

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

Forum Jump


All times are GMT -5. The time now is 03:27 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.