View Single Post
Old 08-01-07, 12:31 PM   #25
minsc_tdp
XO
 
Join Date: Mar 2007
Posts: 411
Downloads: 1
Uploads: 0
Default

Quote:
I did notice that it seemed to have a little more trouble recognizing commands in game than it had in the test mode - I suppose that's a natural consequence of having the game competing for priority or something.
panther noted the above in a PM and I think I have a suspicion of what's going on. Also y'all might have seen funky error messages from time to time that aren't repeatable, as in, they go away when you just say the command again.

I think the reason is that the python listener writes a file anytime an event is fired for the voice rec. This can happen at any moment. The perl script scans the file written by python, but to do this needs to open it, and if the python is writing to it at that exact moment, the file is locked, it throws an error and misses the command. For now I'll just hack this so that it detects this condition and retries until it's unlocked. The right solution is to have the two programs communicate with a better system than reading and writing files. Maybe the registry or a local IP port. I'm not much of a python coder but I'll figure something out.
__________________
June 29 2016 - shSpeech v2.55 - Voice Command for Silent Hunter 4! View Thread
minsc_tdp is offline   Reply With Quote