sukiletxe / vbns-ao2

a vbns emulator (modified from vbns-espeak) which uses accessible_output2
2 stars 4 forks source link

VBNS keeps dying when booted into Windows 95 #4

Open seediffusion opened 3 years ago

seediffusion commented 3 years ago

I have a Windows 95 VM with Window-Eyes installed, using the Braille Mate synthesizer. The problem is that the VBNS emulator will keep dying randomly when Windows 95 is running. No errors or anything, it just... dies. When I boot Windows 95 into MS-DOS mode, however, ASAP fires up and VBNS works just fine. This happens regardless of whether I use SAPI, eSpeak or an auto-detected screen reader; even changing com ports doesn't help. VBNS also works perfectly fine with Windows 98 with the exact same configuration as Windows 95. The same version of Window-Eyes (5.5), the same synthesizer and com port configuration etc.

seediffusion commented 3 years ago

Sometimes it'll say ready, work for a short while and then die, and sometimes it'll die straight away before the ready message.

sukiletxe commented 3 years ago

Sadly I don't know how to fix this. There is no logging functionality in the various parts this uses as far as I know, and I don't have a windows 95 vm to test this (even if I had, I'd have no clue on where to start dbugging this).

seediffusion commented 3 years ago

Upon further investigation, it dies on Win98 as well. Something seems to be happening within Windows that's firing a keyboardInterrupt, causing VBNS to shut down. Another thing is that it'll sometimes throw a value error when selecting a SAPI voice, for example. Something about an invalid literal for int(base 10).

sukiletxe commented 3 years ago

Maybe I can fix that last part. How are you selecting sapi voices?

seediffusion commented 3 years ago

emu.exe com3 --sapi, press Enter, then enter a number to select a SAPI voice from the menu that appears.

sukiletxe commented 3 years ago

OK, are you sure you don't press any key between the menu appearing and pressing enter to confirm a voice selection besides numbers? I'm asking this because in the process of creating and validating the menu the program converts the input given to numbers, and that error means it's trying to convert something which it can't (and numbers, or course, naturally fall outside this category).

seediffusion commented 3 years ago

Absolutely sure.

sukiletxe commented 3 years ago

If you are running from source, the program crashes in tts.py, line 27. If not, tell me and I'll send you a link with the simplest and oldest debug technique, that is print the value of the offending "number" before converting it.

seediffusion commented 3 years ago

I had it working then, but It just died on line 46 in parse.

File "C:\Users\fireseed\Documents\GitHub\vbns-ao2\src\emu.py", line 46, in parse

lst.append((handlers[ch], int(num)))

ValueError: invalid literal for int() with base 10: ''

sukiletxe commented 3 years ago

OK, I think I now what's happening, but not why. The simplest fix would be to nuke the speed and pitch changing functions and the associated code. This would not let the synth change speed and pitch (in ASAP, I assume), but I don't know how many people use this function. Basically, what I think happens is:

I'm sorry for the bagueness, this is really old code which I din't know how it worked even when I started tinkering with it and I made stetically much worse in the process (I've thought many times of nuking it entirely and starting it over). I think I can have some sort of global option for the program not to care about speed and pitch.

seediffusion commented 3 years ago

It's not dying on ASAP under DOS, it's dying on Window-Eyes under Windows. I'm currently uploading my VM to my website so you can do some proper testing. The upload is taking a while because my internet is slow, but it's almost half way there. Want me to send you a link once it's uploaded?

sukiletxe commented 3 years ago

Yup, why not. Though I must warn you again that I'm clueless, I can (and will, of course) try debugging stuff ubt I don't promise anything. I assume Window Eyes has builtin help? (In Spain we didn't use Window Eyes).

Thanks again for your patience with this.

seediffusion commented 3 years ago

OK, the VM is up. https://houseoffireseed.ml/temp/Windows%2095.exe

sukiletxe commented 3 years ago

OK, downloaded, you can delete it if you need that space. I'll test stuff tomorrow or next week. Which should be the other COM port?

seediffusion commented 3 years ago

Leave the serial port as COM4, and initialize the VBNS with COM3 as per the readme file I included in the VM folder.

sukiletxe commented 3 years ago

Yes, I was missing COM 4. Thanks!

seediffusion commented 3 years ago

Hi, did you manage to do any testing with that Windows 95 VM?

sukiletxe commented 3 years ago

I just did some rudimentary testing. ASAP works, but when booting to windows mode, it breaks as you said. A simple fix is changing line 99, which says:

lst.append((handlers[ch], int(num)))

to:

lst.append((handlers[ch], int(num) if num else 8))

That way we ensure that whatever command has been sent will leave the voice in an understandable state.

I haven't yet found it closing itself for no reason. I don't know why it sends a ctl+p followed by E or P, and all I can say is it does (hence the error).

Hth.