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)

H2osmokey 10-14-09 07:08 PM

sh4Speech fixes command_bar.csv
 
I was having some difficultiy with the Battle Stations, Depth Below keel, Damage Control etc and discovered some fixes. Here are some lines to update (don't forget to save the original command_bar.csv).

504 Button LowerLeft Depth Under Keel 500 239 739
505 ButtonLowerLeft Evasive Left 500 286 739
506 Button LowerLeft Evasive Right 500 336 739
569 ButtonLowerLeft Battle Stations 565 238 739
567 ButtonLower Left Damage Control Station 565 140 739

(8D

minsc_tdp 03-16-10 01:09 AM

sooooooooooo
 
Sooooooooooo......

sh5Speech anyone?

billko 03-16-10 01:14 AM

Quote:

Originally Posted by minsc_tdp (Post 1318065)
Sooooooooooo......

sh5Speech anyone?

like you even hadda ask... ;)

ferg 03-21-10 02:33 AM

First off, thanks for sh4Speech. It seems like it's pretty neat, and I imagine a fair bit of work has gone into making it. I write "seems" only because I can't get it to work properly. Does it not support 1440x900? When I order a depth, it clicks the wrong place on the depth dial. I have correctly set my resolution in the batch file. Thanks, guys.

billko 03-21-10 03:46 AM

Quote:

Originally Posted by ferg (Post 1326252)
First off, thanks for sh4Speech. It seems like it's pretty neat, and I imagine a fair bit of work has gone into making it. I write "seems" only because I can't get it to work properly. Does it not support 1440x900? When I order a depth, it clicks the wrong place on the depth dial. I have correctly set my resolution in the batch file. Thanks, guys.

It works by calculating the ratio of your screen's height and width. I THINK there was an issue when you weren't playing at your monitor's native resolution.

Hopefully you can search this thread and find your solution. :)

Bill

ferg 03-21-10 04:50 AM

1440x900 is my monitor's native resolution. :cry:

Edit: I also tried 1024x768, and curiously it appears to be wrong by precisely the same amounts. It's as if the dial is not in the position expected. This made me curious, so I decided to compare screenshots of my TMO modded game with the standard game. It looks as though TMO raises the dials for some reason. That would explain this behaviour. Is this utility incompatible with TMO 1.9?

billko 03-21-10 05:30 AM

Quote:

Originally Posted by ferg (Post 1326334)
1440x900 is my monitor's native resolution. :cry:

minsc is VERY helpful with supporting his application. i'm sure he can help you. :)

ferg 03-21-10 05:56 AM

Problem solved. TMO does indeed transpose the dials. Using a screenshot from the stock game, I figured the TMO dial centres to be 35 pixels higher. By adjusting the values in dials.csv, I got it to work just fine. I think I'm going to enjoy sh4Speech very much once I work out all the TMO incompatibilities.

Thanks for your help Billko. :up:

billko 03-21-10 07:30 AM

It's GREAT to see that you can finally enjoy his work. The first time I used it, it sent shivers down my spine watching the crew respond to my voice with their own voiced acknowledgments. :)

Have fun!

Bill

tomoose 03-21-10 09:08 PM

Still not recognizing aft torpedo tubes
 
Minsc_tdp;
I'd brought this up quite a few posts ago but have been away for awhile. Any updates to the issue where SH4 speech doesn't recognize aft tubes?

cheers,
tomoose

billko 03-21-10 09:36 PM

Quote:

Originally Posted by tomoose (Post 1327441)
Minsc_tdp;
I'd brought this up quite a few posts ago but have been away for awhile. Any updates to the issue where SH4 speech doesn't recognize aft tubes?

cheers,
tomoose

Hi, see post 349 and 350, this thread. I hope this helps! :)

Bill

ferg 03-22-10 02:40 PM

There's a bug with the command "Damage Control Team". sh4Speech outputs the following:

"damage control team"
Code:

damage control team (572, BUTTON) voice command detected at +7.22 seconds
        damage control team (voice_command.csv id = 572)
                Parent detected
                Adding 584 Move Mouse Away
        Type is TAB, data is 384,819
                Moving to bottom left (0, 900) to help load command bar)
                384,819 are mouse coordinates for voice command damage control team from command_bar.csv or dials.csv
                Mouse clicking at 384,819 for Sub Management (id=565)
        Type is BUTTON, data is 336,871
                336,871 are mouse coordinates for voice command damage control team from command_bar.csv or dials.csv
                Mouse clicking at 336,871 for Damage Control Team (id=572)

...all of which looks fine, but it buries the pointer in the lower left at this point and fights any effort to move the pointer away from that corner. sh4Speech becomes totally unresponsive and, as a result of sh4Speech taking away the mouse pointer, SH4 becomes unplayable. I have to Alt-Tab and kill the sh4Speech process. This releases the mouse pointer and SH4 can be played normally.

Note that the text output is complete. This is all it outputs; I didn't cut anything off. You can see that it does not complete the procedure since it never outputs the familiar "Phrase processed. Listening..."

Compared to a similar command, "man the deck gun", it appears to me that the data is defined correctly. Here's the output for that command for comparison.

"man the deck gun"
Code:

Man the deck gun (538, BUTTON) voice command detected at +28.81 seconds
        Man the deck gun (voice_command.csv id = 538)
                Parent detected
                Adding 584 Move Mouse Away
        Type is TAB, data is 216,819
                Moving to bottom left (0, 900) to help load command bar)
                216,819 are mouse coordinates for voice command Man the deck gun from command_bar.csv or dials.csv
                Mouse clicking at 216,819 for Deck Gun (id=536)
        Type is BUTTON, data is 91,871
                91,871 are mouse coordinates for voice command Man the deck gun from command_bar.csv or dials.csv
                Mouse clicking at 91,871 for Man The Deck Gun (id=538)
        Type is MOUSEMOVE, data is 928,582
                928,582 are mouse coordinates for voice command Man the deck gun from command_bar.csv or dials.csv
                Mouse clicking at 928,582 for Move Mouse Away (id=584)
        Phrase processed.  Listening...

Note that everything from "Type is MOUSEMOVE..." onwards is missing from the "damage control team" output.

ferg 03-22-10 02:48 PM

This is a fairly minor bug, but it's irritating and should be fixed. When I give a speed command, it moves my mouse pointer. Since it uses a key command, it shouldn't touch the mouse at all. This is really problematic when I am using a view. For example, let's say I'm viewing a merchant through the scope and order "Ahead 1/3". My view jerks violently away from the target. There's no reason for this, is there? It's an awful work-around to have to release the view, give the throttle order, and then reacquire the view again.

Output is:

Code:

Ahead one third (20, KEY) voice command detected at +4.08 seconds
        Ahead one third (voice_command.csv id = 20)
                Adding 584 Move Mouse Away
        Type is KEY, data is 1
                1 is key sequence for voice command Ahead one third from key_commands.csv
                1 is a single-key sequence
                        Pressing key 1 (virtual key code 0x31) from key_codes.csv
                                Running key() sequence for 1
        Type is MOUSEMOVE, data is 928,582
                928,582 are mouse coordinates for voice command Ahead one third from command_bar.csv or dials.csv
                Mouse clicking at 928,582 for Move Mouse Away (id=584)
        Phrase processed.  Listening...

Note the "Type is MOUSEMOVE" block. This shouldn't happen.


-- Looks like I edited this in before Billko replied. Whoops! --
I think the problem is here in voice.pl:

Code:

if (
             
              ($TYPE{$original_id} =~ /BUTTON/i || $TYPE{$original_id} =~ /DIAL/i
             
              || ($original_id >= 19 && $original_id <= 28) # Telegraph reversion
             
              ) &&
                $original_id != 580 && $original_id != 581 && $original_id != 582 && $original_id != 583) {
              print "\t\tAdding 584 $NAME{584}\n";
              push(@ids, 584); # Move Mouse Away
            }

If the ID is between 19 and 28 inclusive, a mouse move is added. Because minsc kindly included the source, I think I can fix this for myself if I download the necessary compiler; but I think a fix to the official version would benefit all. It's also possible that I'm completely missing something. Maybe there's a reason for this mouse move? I can't imagine what it is.

I'd also make a suggestion from a software design point of view. If per-item mouse move functionality is desired, why not external it in the CSV? If I could just change a mouse move column from "true" to "false" in one of the files, that'd be a lot easier than learning perl and recompiling the script to modify the hardcoding. :DL

Once again, thank you, minsc, for this utility!

billko 03-22-10 02:51 PM

Quote:

Originally Posted by ferg (Post 1328595)
This is a fairly minor bug, but it's irritating and should be fixed. When I give a speed command, it moves my mouse pointer. Since it uses a key command, it shouldn't touch the mouse at all. This is really problematic when I am using a view. For example, let's say I'm viewing a merchant through the scope and order "Ahead 1/3". My view jerks violently away from the target. There's no reason for this, is there? It's an awful work-around to have to release the view, give the throttle order, and then reacquire the view again.

Output is:

Code:

Ahead one third (20, KEY) voice command detected at +4.08 seconds
        Ahead one third (voice_command.csv id = 20)
                Adding 584 Move Mouse Away
        Type is KEY, data is 1
                1 is key sequence for voice command Ahead one third from key_commands.csv
                1 is a single-key sequence
                        Pressing key 1 (virtual key code 0x31) from key_codes.csv
                                Running key() sequence for 1
        Type is MOUSEMOVE, data is 928,582
                928,582 are mouse coordinates for voice command Ahead one third from command_bar.csv or dials.csv
                Mouse clicking at 928,582 for Move Mouse Away (id=584)
        Phrase processed.  Listening...

Note the "Type is MOUSEMOVE" block. This shouldn't happen.

There was a valid reason for this. It was discussed early in this topic, but I cannot, for the life of me, remember WHY it is that way...

Bill

billko 03-22-10 02:57 PM

Quote:

Originally Posted by ferg (Post 1328576)
There's a bug with the command "Damage Control Team". sh4Speech outputs the following:

"damage control team"
Code:

damage control team (572, BUTTON) voice command detected at +7.22 seconds
        damage control team (voice_command.csv id = 572)
                Parent detected
                Adding 584 Move Mouse Away
        Type is TAB, data is 384,819
                Moving to bottom left (0, 900) to help load command bar)
                384,819 are mouse coordinates for voice command damage control team from command_bar.csv or dials.csv
                Mouse clicking at 384,819 for Sub Management (id=565)
        Type is BUTTON, data is 336,871
                336,871 are mouse coordinates for voice command damage control team from command_bar.csv or dials.csv
                Mouse clicking at 336,871 for Damage Control Team (id=572)

...all of which looks fine, but it buries the pointer in the lower left at this point and fights any effort to move the pointer away from that corner. sh4Speech becomes totally unresponsive and, as a result of sh4Speech taking away the mouse pointer, SH4 becomes unplayable. I have to Alt-Tab and kill the sh4Speech process. This releases the mouse pointer and SH4 can be played normally.

Note that the text output is complete. This is all it outputs; I didn't cut anything off. You can see that it does not complete the procedure since it never outputs the familiar "Phrase processed. Listening..."

Compared to a similar command, "man the deck gun", it appears to me that the data is defined correctly. Here's the output for that command for comparison.

"man the deck gun"
Code:

Man the deck gun (538, BUTTON) voice command detected at +28.81 seconds
        Man the deck gun (voice_command.csv id = 538)
                Parent detected
                Adding 584 Move Mouse Away
        Type is TAB, data is 216,819
                Moving to bottom left (0, 900) to help load command bar)
                216,819 are mouse coordinates for voice command Man the deck gun from command_bar.csv or dials.csv
                Mouse clicking at 216,819 for Deck Gun (id=536)
        Type is BUTTON, data is 91,871
                91,871 are mouse coordinates for voice command Man the deck gun from command_bar.csv or dials.csv
                Mouse clicking at 91,871 for Man The Deck Gun (id=538)
        Type is MOUSEMOVE, data is 928,582
                928,582 are mouse coordinates for voice command Man the deck gun from command_bar.csv or dials.csv
                Mouse clicking at 928,582 for Move Mouse Away (id=584)
        Phrase processed.  Listening...

Note that everything from "Type is MOUSEMOVE..." onwards is missing from the "damage control team" output.

Sounds like it could be related to the special CSV files for your specific mod. Since SH4Speech hasn't been udated in a while, they may have become outdated. Try asking around to see if anyone has made some revised ones.

Bill


All times are GMT -5. The time now is 03:43 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.