![]() |
Quote:
sh4speech.bat just runs go.pl, which tries to invoke the popup of hear.py. Sounds like the invocation of that failed, but you got hear.py to run on your own, which is just as good. If it said "Listening for voice commands..." then hear.py is working fine, and the question is, is go.pl running? Sounds like no, and probably since it failed, it brought down hear.py with it. It shouldn't but I suppose if it crashed quickly enough it could. Question is, why isn't go.pl running? Open a command prompt, go do the command "cd \sh4speech" and then type "perl go.pl" (without all the quotes of course.) You'll probably see an error, paste that here and we can make some progress. It's hard for me to get on the internet here, but when I return I'll write a nice test script that probes all of the various things, like a troubleshooter, which should help make all this easier. |
Quote:
thanks for your answer. Instead of using the zip-files from your download-link (btw.: it seems the link isn't working any longer..) I downloaded the msi installation package of ActivePerl (http://www.activestate.com/store/dow...9-e1483f751c4f) and perl is working. Now I got a similar problem like moselgott. The window of hear.py is closing after a second with following error message: Code:
Traceback (most recent call last): Possibly some other users successfully tested sh4speech on Vista?? |
Hey you Guys, thanks for your help!
I managed to figure out the problem, or better to say I solved it without knowing what it was :dead: Anyway, I removed everything and reinstalled each single programme, and voilā, everything works as it should now! I was so amazed when I became aware about the possibilities, so I send you a bigger than big THANK YOU, PERFECTLY DONE!!!!!!!!!!!! Iīm just wondering what I have to do if I want to use this for IL-2... |
Moselgott - There is absolutely nothing in the code that is specific to SH4. The only thing that makes it work in that game is the CSV files defining all of the commands. You could easily modify those files and make it work with any game. When it presses the keys, it just sends it to the keyboard so theoretically any game should respond to them. Go nuts!
|
Fraggulus - the only thing I could possibly recommend there is to make sure to install Microsoft SAPI 5.1 SDK for Windows Vista, if such a thing exists. I know that Vista includes a new version of the speech engine, version 6.0+, and it's possible that hear.py is trying to hook into 5.1 which simply isn't there. It might work to just install it, who knows. I have Vista installed at home so I'll try to get it working there when I return. Possibly, some minor changes need to be made to hear.py to get it to just use the newer Vista speech engine instead of being stuck on 5.1.
|
Hi minsc_tdp!
Thanks for your answer, I will try that later on for IL-2 and publish it, of course only if you donīt mind! But so far I canīt stop bombing you with problems, sorry for that:oops: I added some other speech commands, as for example "battlestation". I added the refering entries in the key_codes.csv, key_commands.csv and voice_commands.csv. When the speech recognition is activated, following problem appears: phyton.exe correctly shows "battlestation 1186415552.0" (I donīt know what this number means though) but in a way this is not correctly converted. The programme that makes the key being "pushed" shows this: Battlestation Pressing key Bā.. Use of uninitialized value in pattern match (m//) at go.pl line 102 Use of uninitialized value in hex at go.pl line 118. This phenomenon also appears with several other commands, but not with all altough I canīt detect any differences in the way I entered them. Do you know what this can be caused by? Thanks a lot:rock: |
Quote:
Quote:
I'm thinking of cleaning this whole thing up and condensing it down to two files - one for SH4 commands with associated keys and virtual key codes all in one file, and one for the voice commands. What do you guys think? Are we in too deep with what we have? |
By the way all, I'm back from my vacation and while I have some catching up to do with work, I plan to get on this flank speed this week with some (hopefully) amazing updates. In general I think what it needs most is a proper installer and a troubleshooter script to help detect issues before allowing the scripts to just run and sink. There's a known bug where a timing issue causes the Perl script to be unable to get the voice command that the Python script detected. There's some basic keys that should have already been added to the key_codes.csv and some cleanup there too since the scancodes aren't even being used and probably never will. The mouse support feature will be worked on after all of these other bugs are fixed (kind of like how I actually complained about adding the Colorado to SH4 when there were still so many bugs to work on. Devs tend to lean toward working on "interesting" things rather than necessary things.)
|
Hi again!
Iīve found my mistake. In the key_commands my entry for "B" and the other commands that didnīt work looked like this: 81,Key,Battlestation,B..... and not 81,Key,Battlestation,B,,,,, such a shallow detail, but so important...nevertheless, if one door shuts, another opes; or the other way round: A question that is not related to this topic: How can I include a hotkey for "select tube 7 (8,9,10)", because in the commands.cfg of SH4 only there is only an entry for tubes 1-6. Thanks in advance (and sorry for my continuous asking...) Moselgott! EDIT: Ok, I think thereīs another problem. If pushing Ctrl+F1 (my choice for "select Tube 1"), Tube 2 is selected. If pushing Ctrl+F2, Tube 3 is selected until pushing Ctrl+F6, then Tube 7 is sleceted. No chance to select tubes 1,8,9,10 w/o using the mouse or cycling tubes. Whatīs that? |
I'll have to fix the bug where if there's no comma after the B that it fails. That's a stupid bug and my own fault.
Regarding "select tube x" I haven't looked at anything other than the default keys according to the reference card. I have to focus on defaults so that it works for everyone. I haven't even looked at the CFG file you speak of. For those extra tubes, it sounds like SH4 does not allow you to map ANY key to open tubes over 6. So in that case you're basically screwed for now since I only support keys. When we get mouse support in maybe I could get that going, but I didn't know there even WERE subs with more than 6 tubes. I guess those are different boats, which introduces a difficult problem: I presume the tube control panel will look different, and in that case, I'll need to define correct mouse coords for every torpedo control panel type and give you a way to indicate which one you're using, since it would be impossible for it to figure that out on it's own. Sounds like a lot of work... [groan] |
Welcome Google searchers. I don't know why it dumps you on Page 3 (must be a good page) so you should probably start at the beginning:
http://www.subsim.com/radioroom/showthread.php?t=119430 Quote:
How about this: With my latest changes you can chain commands together using the & symbol. If you start the game and don't touch any of the tube selection keys and only use voice, we could set it up to open tube 8 by hitting the cycle key 7 times (from 1), toggling that tube, and cycling 3 more times to go back to tube 1. I don't know how fast you can mash these keys into SH4 and have it get them right but it's worth a shot. I already made a fix where you can chain together as many keystrokes as you want but I haven't uploaded it yet. |
Quote:
|
1.1 released!
Download URL:
v1.1: http://knepfler.com/sh4speech1.1.zip (~ 7 MB) CHANGES IN THIS RELEASE ----------------------- 1.1 Bugfix release and minor enhancements Bug Fixes: Cleaned up extra commas from CSVs and fixed bug where it would fail without them (added a chomp() to each line read) Lowered $KEY_HOLD (time to hold down keys) from 0.1 seconds to 0.05 seconds Moved the launch of hear.py into the two BAT files since sometimes the Perl script may not launch it correctly. Added a check in the perl script on the phrase.tmp file to prevent reading it while it's being written which caused a rare failure Added a global variable $MULTI_KEY_DELAY to determine wait time between key presses for multi-key sequences and set it to 0.1 second Updated bad download URLs in readme New Features and Improvements: Added command chaining support using & symbol in key_commands.csv. See Raise All Masts at the bottom of that file for an example. Drastically improved the text output from both windows to make more sense and help a little with debugging and general understanding Improved the code readability for anyone who might be trying to match up my perl hashes to the CSV files Switched to Creative Commons license since it's easier to understand Added several missing keys to key_codes.csv and alphabetized them for readability, so you can try more keys in key_commands.csv without having to bother to figure out the code stuff Compatibility No changes were made to the CSVs that would prevent you from using modified ones from v1.0 with this release. |
Quote:
Nontheless I couldnīt solve my problem. Why is tube 2 selected when pushing Ctrl+F1? And why is there no possibility to select tubes 1,8,9,10? |
Quote:
I didn't find any SDK for Vista. Maybe because of the already built-in speech recognition?? |
All times are GMT -5. The time now is 02:17 AM. |
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.