SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH4 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=219)
-   -   [REL] sh4speech - voice command for SH4 (https://www.subsim.com/radioroom/showthread.php?t=119430)

panthercules 09-07-07 10:37 PM

I've discovered one major problem with my SH4Speech 2.21 install - despite having added this command and tweaked my .csv files to the max, and checking syntax, ID#s, etc. out the wazoo, I keep shouting out the command "LEO/KRILLER - RELEASE REFLECTIONS ON THE WATER", "LEO/KRILLER - RELEASE REFLECTIONS ON THE WATER", over and over again but the program doesn't seem to recognize the command, and nothing happens :damn:

Please see if you can fix this problem in your next update :yep:

jaketoox 09-08-07 01:59 AM

Quote:

Originally Posted by panthercules
I've discovered one major problem with my SH4Speech 2.21 install - despite having added this command and tweaked my .csv files to the max, and checking syntax, ID#s, etc. out the wazoo, I keep shouting out the command "LEO/KRILLER - RELEASE REFLECTIONS ON THE WATER", "LEO/KRILLER - RELEASE REFLECTIONS ON THE WATER", over and over again but the program doesn't seem to recognize the command, and nothing happens :damn:

Please see if you can fix this problem in your next update :yep:

..have you checked out where your microphone is manufactured......if id reads "made in china"....it is possible that "youl miclophone will not lecognize youl command because it's containing too many l:s lepeatedly".....:yep:...only known plopable fix is leplacing l:s with l:s, but they say it will wolk only in 50 plocent of cases...:know:

Jake

billko 09-08-07 11:34 AM

I hope this isn't considered hijacking this thread, but I just wanted to let the people using this mod know that I am working on the following change to the voice_commands.csv file:

All commands contianing numbers (heading, depth, etc.), will be called out as individual numbers instead as a complete number. For instance, "heading left one hundred fifteen degrees" will instead be called out as "heading left one one five degrees."

In addition, all references to the number "nine" will instead be referred to as "niner." I've noticed that the Microsoft's speech interpreter confused numbers like "fifteen" and "fifty" very often (as in real life!). Also, "niner" is being introduced as a way to distinguish "five" from "nine," which, even though MickeySoft's interpreter never made a mistake, I thought it might add to the immersion factor. I just thought of something. I don't know if "niner" would interpret to other languages, so you can just do a search for "niner" and replace it with "nine." Sorry about that.

If anyone's interested, it will probably be done in a few days.

My hat's off to minsc_tdp for making the mod in the first place, and for making it so accessible to fellow modders!

Bill

panthercules 09-08-07 01:17 PM

@billko - good idea - I did this a while back in my install for the depth readings, (though only for every 5-foot increment), and it does make it sound better. After watching some old WWII sub movies again, I decided not to do it with my rudder commands (though I did change them to a format like "right 10 degrees rudder", again in 5-degree increments), and since you do need 1-degree precision with the heading commands I decided not to do it with those yet (too much work :lol: ).

If minsc could figure out how to let us order a specific course ("make your course two four zero") instead of having to order relative course (which is still an amazing achievement by minsc - don't get me wrong here), I'd do it with those commands too.

I've got a heavily-tweaked set of .csv files, which depend in part on some changes I've made to the commands.cfg file (I added keys mapped to several additional commands so I could use them with SH4Speech), and from which I have also removed some of minsc's commands that I just don't happen to be using yet, and so they aren't really amenable to being used as a JSGME-ready mod. Therefore, I haven't really tried to set anything up to be posted, but you can find a copy of my .csv files here in case anybody just wants to look at them for ideas about how they might want to tweak their own files:

http://files.filefront.com/Panthers+.../fileinfo.html


Minsc has done something really cool here, escpecially making it so easy to customize it to your own tastes - well done Minsc :up:

minsc_tdp 09-08-07 11:38 PM

Quote:

Originally Posted by billko
"niner"

Send it to me when you're done and I'll put it in the distro as an alternate CSV, I meant to do this at well at some point

billko 09-08-07 11:48 PM

Quote:

Originally Posted by minsc_tdp
Quote:

Originally Posted by billko
"niner"

Send it to me when you're done and I'll put it in the distro as an alternate CSV, I meant to do this at well at some point

Hey, it was a lot easier than I thought it would be. Judicious use of the find/replace and all that was left to manually update were all the entries with "zero" in them. :) I'll get it to you tomorrow.

Thank you *so much* for making your application so easily customized!:rock: :up:

Bill

billko 09-09-07 02:29 PM

how do you control the "key press" speed?
 
I'm asking because my computer slows down enough in the periscope view that all the tube cycling commands don't get recognized. In contrast, when I am in map mode where the computer is not breathing hard, the cycling works just fine. I need to slow down the "keystrokes" coming from sh4speech. Thanks!

Bill

minsc_tdp 09-09-07 03:03 PM

Quote:

Originally Posted by billko
I'm asking because my computer slows down enough in the periscope view that all the tube cycling commands don't get recognized. In contrast, when I am in map mode where the computer is not breathing hard, the cycling works just fine. I need to slow down the "keystrokes" coming from sh4speech. Thanks!

Bill

There's no way right now. How about I add a general multiplier that you can change via the launch BAT file that will speed or slow everything. So the default would be 1 and you would change it to like 1.2 to increase the delays a bit.

billko 09-09-07 03:17 PM

Quote:

Originally Posted by minsc_tdp
Quote:

Originally Posted by billko
I'm asking because my computer slows down enough in the periscope view that all the tube cycling commands don't get recognized. In contrast, when I am in map mode where the computer is not breathing hard, the cycling works just fine. I need to slow down the "keystrokes" coming from sh4speech. Thanks!

Bill

There's no way right now. How about I add a general multiplier that you can change via the launch BAT file that will speed or slow everything. So the default would be 1 and you would change it to like 1.2 to increase the delays a bit.

That would be beautiful, but you don't have to release it until you have a bunch of other stuff, too. I can always cycle them by saying "next tube." :)

Bill

minsc_tdp 09-09-07 11:39 PM

Quote:

Originally Posted by billko
I can always cycle them by saying "next tube." :)Bill

Careful with that, if it missed a tube switch, say you start at 1 and say "tube 3" and it misses it, then you say "next tube" twice to reach tube three, it will actually think you're on tube 5. Then if you say "open tube 1" it will think it has to go 2 more to go 6,1 and it will actually end up opening tube five (cuz you're on 3 and it goes 3+2). So it's best we fix this. If you find yourself all mixed up of course just say "reset tubes" and click tube 1, and it should be fine from there.

billko 09-10-07 07:01 AM

Quote:

Originally Posted by minsc_tdp
Quote:

Originally Posted by billko
I can always cycle them by saying "next tube." :)Bill

Careful with that, if it missed a tube switch, say you start at 1 and say "tube 3" and it misses it, then you say "next tube" twice to reach tube three, it will actually think you're on tube 5. Then if you say "open tube 1" it will think it has to go 2 more to go 6,1 and it will actually end up opening tube five (cuz you're on 3 and it goes 3+2). So it's best we fix this. If you find yourself all mixed up of course just say "reset tubes" and click tube 1, and it should be fine from there.

I figured that, so I don't rely on it. If the torpedo room didn't "hear" me, I hit the "w" to make sure the command goes through. From the documentation you provided, I figured it was absoultely essential to do this or everything would get out of sync. And, of course, the few times I forgot, I went to "manual override" until I was out of the firefight, then "reset tubes" - after manually setting the tube to tube one, of course.

I hope that the delay thing will fix it. My theory is that when it starts to lag, the program starts loading the keyboard buffer more quickly than SH4 can read it; therefore, some of the "keystrokes" are overlooked. The other theory is that SH4 clears the keyboard buffer right before it reads it, instead of right after it reads it. While that seems to be just semantics, it comes into play when the game slows down significantly because the window of opportunity where the player can input a keyboard stroke and have it be cleared "accidentally on purpose" gets pretty big. A variant of that theory is that the computer slows down so much that the keyboard interrupt isn't serviced until it's too late and the SH4 dumps the keyboard input for the reason above. I dunno, timing gets hairy when the computer is under duress like that. The last theory would explain why, when deep in time compression, the mouse and keyboard become fairly unresponsive, and may be the reason why keyboard strokes are lost to me when the graphices slow the game down.

I hope this has given you some insight on how you might make this super mod accomodate slow rigs like mine. I say it's optional because there's nothing wrong with the mod; it's something wrong (read: slow) about some of the computers it's being run on.

Bill

minsc_tdp 09-10-07 06:01 PM

Yeah I hear ya on the lag thing. That's why my first thought was to make a general multiplier that slows everything and is configurable. I've learned my lesson with other similar tools like this I have written - don't hardcode the delays. So I am using global variables at the top that are easy to adjust, no delays are hardcoded (though from y'all's perspective, it is, since it's currently not changable. So that'll get fixed.)

minsc_tdp 09-12-07 12:57 AM

2.22 posted with delay multiplier, see changelog!

minsc_tdp 09-13-07 09:50 PM

Off topic post: I have a poll/raging argument going on that I need everyone's input on. Link is here.

http://www.subsim.com/radioroom/showthread.php?t=122118

It is right up your guys' alley since it's about the physics of water pressure on an underwater object with chambers and seals, just like a sub.

U99 09-14-07 05:11 AM

hi, i've just installev v2.22 of the speech recognition program. I'm running it in Windows Vista. I have to say well done guys I've been looking for something like this ever since I played Sub Command with voice controls.

I have to say, it works perfectly...on my desktop. When I start it up, I get a little console page and a small microphone on my taskbar. All's good. I hold down "print screen" and talk and the order shows up in the console no preoblem, perfect accuracy every time.

HOWEVER, when I start the agme (leaving the console running in the backround) it's very hit and miss. Half the time it ignores me. The strange thing is... if I minimse the game and look at the console, it has recognised every single command perfectly and executed it... but the game hasn't registered!!!! There are also times when its opens internet explorer or dragged icons across my desktop, or something like that.

I am running Trigger Maru 1.6.2 but I didn't think this would be a problem because I am running "sh4speech-trigger maru.bat". It gets the stations right and remembers the Y key for the aft tubes, so im sure its mapped correctly.

Someone please help:cry: I want to give you all a massive pat on the back for this mod but I'd like it to work properly first, lol.

billko 09-14-07 07:47 AM

Quote:

Originally Posted by U99
hi, i've just installev v2.22 of the speech recognition program. I'm running it in Windows Vista. I have to say well done guys I've been looking for something like this ever since I played Sub Command with voice controls.

I have to say, it works perfectly...on my desktop. When I start it up, I get a little console page and a small microphone on my taskbar. All's good. I hold down "print screen" and talk and the order shows up in the console no preoblem, perfect accuracy every time.

HOWEVER, when I start the agme (leaving the console running in the backround) it's very hit and miss. Half the time it ignores me. The strange thing is... if I minimse the game and look at the console, it has recognised every single command perfectly and executed it... but the game hasn't registered!!!! There are also times when its opens internet explorer or dragged icons across my desktop, or something like that.

I am running Trigger Maru 1.6.2 but I didn't think this would be a problem because I am running "sh4speech-trigger maru.bat". It gets the stations right and remembers the Y key for the aft tubes, so im sure its mapped correctly.

Someone please help:cry: I want to give you all a massive pat on the back for this mod but I'd like it to work properly first, lol.

Unfortunately, I think that not much can be done at this point because the graphics are slowing the system down enough so that it starts missing keyboard (and mouse) interrupts. A variable was introduced in the latest version to try to slow down keyboard input from the mod to avoid sending keystrokes too quickly in succession, but that's only part of the problem. If you notice the way *you* use the keyboard when looking through the periscope or on the bridge, I bet one thing you do is hold the keys down longer. You hold them down until you see a response from the game. Unfortunately I don't think it would be an easy task to put a watchdog on the thread in the game used for keyboard and mouse input. One place I notice it misses for me is when selecting and opening/closing torpedo tubes while looking through the attack periscope. If you go to a more static screen such as the map or the torpedo management screen, you'll find that it executes flawlessly. I'd say that if you experience any significant frame rate drops in a view, you'll also experience "missed" commands. You just have to accept that your crew is hard of hearing - too many depth charges, I suppose. ;)

Bill

U99 09-14-07 07:54 AM

i guess that kinf of makes sense. I edited the delay variable to 1.2 and then to 1.5 but I didn't get much better. one thing i DID notice with a little further testing is that mouse inputs execute flawlessly in all views. It only misses keyboard inputs. But i have to say you're right about missing tube orders in periscope view. that's something to try I guess, going to map (but then, i can't shout "map" becuase it ignores me, lol)

in a way, it's not too bad becuase hitting a key is the easy part compared to clicking around, and its still a really cool mod. I'll test it a bit more.

just as a check, what value do you use on the delay setting?

Digital_Trucker 09-14-07 07:55 AM

Quote:

Originally Posted by billko
You just have to accept that your crew is hard of hearing - too many depth charges, I suppose. ;)

Bill

And, no, screaming louder won't help, I tried that when I had FPS problems myself:oops:

billko 09-14-07 08:25 AM

LOL guys. But seriously, I've found that the delay thing doesn't help me much at all because I have a lower-end computer and I don't think anything short of a major upgrade will help.

When firing torpedoes from the attack persicope view, I find it more useful to say "next tube" bacause it almost always gets the first voice command. If it SH4 *doesn't* recognize the "next tube" command, but you verify that it was sent, *manually* cycle to the next tube so that the speech application doesn't lose synch with the game. Before getting in a firefight, if I need to do something like open tube doors, I go to the torpedo management screen and execute the commands there. And yes, I'm that lazy.

Bill

Digital_Trucker 09-14-07 11:23 AM

Not to change the subject, but.....
 
I've run into a little problem that I'm not sure whether it's just me or not. Is anyone having any difficulties with the rudder and bearing commands? I have just recently started using these commands and ran into a strange occurrence. When I give any bearing or rudder command (i.e. rudder port/starboard X degrees) the command is executed perfectly except that it always goes to the starboard side. I have checked in the command window for sh4speech and it is correctly recognizing the orders, just executing all to one side. I'm running 1280x1024 and have set that up in the batch file. Has anyone seen this behavior and/or know what causes it?


All times are GMT -5. The time now is 09:52 PM.

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