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 08-14-07, 01:53 PM   #1
Fraggulus
Swabbie
 
Join Date: Jul 2007
Posts: 7
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by minsc_tdp
I got it working in Vista!
Yeah, it really works! Great! Big thanks!!

Now I have to melt my German version of Vista and the English commands.. This isn't really working offhand.

Quote:
But I'm pretty sure you need to say "start listening" or it will ignore everything.
Yep, speech recognition must be listening, otherwise it ignores all.

F.
Fraggulus is offline   Reply With Quote
Old 08-14-07, 02:13 PM   #2
Fraggulus
Swabbie
 
Join Date: Jul 2007
Posts: 7
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Fraggulus
Now I have to melt my German version of Vista and the English commands..
Hi minsc_tdp,

atm I'm changing the voice_commands.csv to check how it is possible to translate the commands. For an example, I want to change "4,Bridge,Bridge" to "4,Bridge,Brücke". But it's not recognizing. Instead I have to say "4,Bridge,Brucke". Is there a possibility to get umlauts working?

F.
Fraggulus is offline   Reply With Quote
Old 08-14-07, 03:01 PM   #3
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

Quote:
Originally Posted by Fraggulus
Quote:
Originally Posted by Fraggulus
Now I have to melt my German version of Vista and the English commands..
Hi minsc_tdp,

atm I'm changing the voice_commands.csv to check how it is possible to translate the commands. For an example, I want to change "4,Bridge,Bridge" to "4,Bridge,Brücke". But it's not recognizing. Instead I have to say "4,Bridge,Brucke". Is there a possibility to get umlauts working?

F.
I would guess that's because the English recognizer is still running. If German is set up properly in Vista, umlauts should be recognized just fine. I wouldn't rely on the English recognizer for words like "brucke", even though it sort-of works, that's not an English word so it wouldn't be optimized for that. It just made a guess based on the phonetics and maybe happened to work, but I wouldn't think it would be very reliable.

In Vista:
Control Panel
Search for "speech" in the upper-right bar
Click Speech Recognition Options
Click Advanced speech options (upper left)
Under Language, what is selected? Should be v8.0 German. If not, and it's not selectable in the list, you may have to install some kind of add-on pack.

According to this page:
http://www.microsoft.com/speech/spee...evarticle.mspx
"Windows Vista includes in all editions our latest speech recognition engine, version 8.0. Available in US English , UK English, French, German, Spanish, Japanese, Traditional Chinese and Simplified Chinese. The engine is included with the corresponding Windows Vista language. Users can install multiple languages by purchasing Windows Multilingual User Interface Packs."

So that sounds like it should be included with the language you have installed, if Vista itself is actually German (and not an English vista with some German stuff installed into it), it should already be German. What happens if you start the windows speech recognizer widget from control panel and say "start listening"? What if you say "fangen Sie an zu hören" or however you would say that in German? What if you say "start wordpad" or "anfang Wordpad"? Which works?

If so your German recognizer is working fine, it could be an umlaut/unicode/script problem, but before I dive into it I'd like to hear that the above is working right.

I'm not sure how I can test that without installing German Vista, which I can't do easily (maybe at work... lots of test machines... but I'd rather not.)
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread
minsc_tdp is offline   Reply With Quote
Old 08-14-07, 04:59 PM   #4
Payoff
Captain
 
Join Date: Mar 2005
Location: Nash Town, USA
Posts: 525
Downloads: 1
Uploads: 0
Default

Thanks. I still dont know why they abandoned the incremental rudder after SH2. I will have to see if I can get this set up. I suppose as long as I leave the dial in the compass mode I will always have the same base to work from. In fact the only reason I switch dials is to click on the tiny rudder display.
__________________
"Hit Shokaku class carrier with three out of six torpedos. Recieved 105 depth charges during three hour period. Heard four terrific explosions in the direction of target, two and one half hours after attack. Believe that baby sank!" Lieutenant Commander Herman Kossler USS Cavalla
Payoff is offline   Reply With Quote
Old 08-14-07, 05:19 PM   #5
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

Well I'm sure some people use the compass more than the rudder, and some use the rudder more. I think it's pointless to try to prefer one or the other, they need equal treatment. Each has its purpose.

Has anyone tried the "reset tubes" thing yet? I'd like feedback on that, since a similar reset command would probably be used to keep the voice system in sync with the status of the dials.
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread
minsc_tdp is offline   Reply With Quote
Old 08-15-07, 10:16 AM   #6
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

Wow! Looks like you've been real busy while I've been gone on vacation. Had no Internet access for the last week or so, and just got back to see all this activity. Just D/L'ed the newest version (1.55) and trying to figure out the best way to migrate my customized 1.0 install to this new one. Before I start playing around with the .csv files, I had a basci installation question. I've renamed my old 1.0 sh4speech folder to keep as a backup, and unzipped the new 1.55 sh4speech folder to my c:\ root to replace it. I still have all the other prerequisite applications installed (perl, python, SDK 5.1, etc.) that I was using for version 1.0.

So - here's the question: Do I need to run the "install.bat" again, or should I be able to just start running the program like I did the previous version?

[edit] Also, do I understand the heirarchy of the file structure correctly, such that the voice_commands.csv is really the key/controlling file, in that if I don't want or need a bunch of the new button-bar or TM-related commands I can leave them in the other .csv files and they'll just be ignored if I don't put any triggering voice commands into the voice_commands.csv file that use or refer to them (as long as I don't create any conflicts by what I put into the voice_commands.csv file)? I've already customized my voice_commands.csv file so heavily from version 1.0 that I'm thinking I might be better off just pasting in a few of the cool new things (like the tubes stuff) into my old file rather than start over customizing the new one (but I'm still poking around in the new files checking out all the cool new stuff, so that might change).
__________________

Last edited by panthercules; 08-15-07 at 12:38 PM.
panthercules is offline   Reply With Quote
Old 08-15-07, 01:22 PM   #7
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

Quote:
Wow! Looks like you've been real busy while I've been gone on vacation.
Welcome back! Where'd you go?

Quote:
I was using version 1.0. Do I need to run the "install.bat" again, or should I be able to just start running the program like I did the previous version?
It should just run without reinstalling. The install.bat hasn't changed much, other than to help people get it installed who were having trouble. Worst case you could always run install.bat again, it won't hurt anything (including your CSVs) to repeat the install.

Since there have been so many changes, I'd advise you to read the readme all the way through again, I've injected lots of little changes throughout.

Quote:
Also, do I understand the heirarchy of the file structure correctly, such that the voice_commands.csv is really the key/controlling file, in that if I don't want or need a bunch of the new button-bar or TM-related commands I can leave them in the other .csv files and they'll just be ignored if I don't put any triggering voice commands into the voice_commands.csv file that use or refer to them (as long as I don't create any conflicts by what I put into the voice_commands.csv file)? I've already customized my voice_commands.csv file so heavily from version 1.0 that I'm thinking I might be better off just pasting in a few of the cool new things (like the tubes stuff) into my old file rather than start over customizing the new one (but I'm still poking around in the new files checking out all the cool new stuff, so that might change).
If there's no entry in voice commands with an ID that matches one of the other files, it is essentially ignored. It is still loaded into memory, but we're talking such small amounts here that it doesn't matter.

The upcoming version moves the various types of commands into many different CSV files: Keys, SetVar, Tubes, Commandbar, Dials. They're all basically the same format but split up just to help organization.

It'll be a bit of a pain to merge your changes, so to make it easy, you should go through your changes to the files and make a note of which rows have changed or are new. All columns to the right of the last one I use are ignored so you can add notes like the "Trigger Maru" notes you see I put in. Then you can sort by this column, and it'll group all of your customizations together for easy copypasting.

I'm working pretty hard on the Dials stuff to get precise depth, heading, and speed control in. If I get it working, it should work very well, and be very easy to add definitions to cover other resolutions. I think it will be a few days at best before I get this released, though I'm going to push for tonight.
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread
minsc_tdp is offline   Reply With Quote
Old 08-18-07, 04:43 PM   #8
Fraggulus
Swabbie
 
Join Date: Jul 2007
Posts: 7
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by minsc_tdp
Quote:
Originally Posted by Fraggulus
..Is there a possibility to get umlauts working?
[...]
Under Language, what is selected? Should be v8.0 German.
.What happens if you start the windows speech recognizer widget from control panel ... Which works?
Hi minsc,
yes, it is 8.0 German and it is working with the German commands. English commands are not recognized.

Quote:
If so your German recognizer is working fine, it could be an umlaut/unicode/script problem, but before I dive into it I'd like to hear that the above is working right.

I'm not sure how I can test that without installing German Vista,
finally I got it working in large part. If I run 'python hear.py' words with umlauts are recognized. I guess I 'just' have to train my speech recognition one or two more times.

But I saw another failure. If I run 'sh4speech.bat' all commands are recognized except those with umlauts. The error message is as follows:
Code:
Phrase processed.  Waiting for a new phrase...
pythoncom error: Python error invoking COM method.

Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\win32com\server\policy.py", line 285, in _Invoke_
    return self._invoke_(dispid, lcid, wFlags, args)
  File "C:\Python25\Lib\site-packages\win32com\server\policy.py", line 290, in _invoke_
    return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)
  File "C:\Python25\Lib\site-packages\win32com\server\policy.py", line 588, in _invokeex_
    return func(*args)
  File "hear.py", line 94, in OnRecognition
    print phrase
<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode character u'\xe4' in position 1: ordinal not in range(128)
The spoken command was 'nächste Einheit' and the used version of sh4speech was 1.51.

F.
Fraggulus is offline   Reply With Quote
Old 08-19-07, 12:07 AM   #9
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

Quote:
finally I got it working in large part. If I run 'python hear.py' words with umlauts are recognized. I guess I 'just' have to train my speech recognition one or two more times.

But I saw another failure. (...error details...)
Wait, that detailed error looks like an error in hear.py. But you said when you run python hear.py that they are recognized, so that is a bit confusing. I'm trying to figure out which of the two is failing - hear.py or go.pl.

I ran some quick tests with go.pl and I see that, even if a valid umlaut voice command is forced in (not using hear.py but with my special trick), go.pl does not handle it properly. I'll look into it.
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread
minsc_tdp is offline   Reply With Quote
Old 08-19-07, 12:10 AM   #10
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

I just noticed an error message in 1.6:

"my" variable $x masks earlier declaration in same scope at go.pl line 346, <DATA> line 164.
"my" variable $y masks earlier declaration in same scope at go.pl line 346, <DATA> line 164.

I've fixed it (just updated 1.6 without changing the version number) since it was a harmless error that didn't affect anything.

By the way, you can run sh4speech from anywhere now, it doesn't need to be in c:\sh4speech.
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread

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

Just noticed something while tweaking up the voice commands for depth and course as mentioned above - all of the course-related commands are relative to current heading (e.g., come right (or left) xx degrees). Is there any chance of making it work so that you could order a course in "absolute" terms, i.e., "make your course 60 degrees"? It seems like there should be some way to do this by formula, if there's any way to know what your current heading is, but maybe there's no way to automatically get this info to your speech program.

Perhaps you could set this via some sort of variable command (like you do with the resetting your tubes thing) - for example, first say "current heading xx degrees", followed by saying "make your course yy degrees". Then the program could compute how many degrees (zz) left or right you needed to go by properly comparing yy to xx, and then trigger the same mouse click command as if you had spoken "come left (or right) zz degrees".

Any chance something like that could work?
__________________
panthercules is offline   Reply With Quote
Reply


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:47 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.