Closed blindgoofball closed 4 hours ago
Provide an example code you using.
Certainly. Here’s the code I use. I was also looking at the code and may have found what is wrong, more on that after the code.
import sral
s=sral.Sral()
s.speak('Hello.')
This code will speak with NVDA, but not Jaws. It uses SAPI instead when jaws is running.
As for what I found in the code, I think it has something to do with the initialize function. When you’re adding the engines to the vector, you add SAPI before jaws, which I think is the problem. I could be wrong, and unfortunately I don’t own JAWS myself to test this. I discovered this issue when having a friend who runs jaws run this code.
I hope this helps.
From: M_maker @.> Sent: Friday, October 25, 2024 17:58 To: m1maker/SRAL @.> Cc: blindgoofball @.>; Author @.> Subject: Re: [m1maker/SRAL] The library does not detect Jws before SAPI when using the python bindings. (Issue #9)
Provide an example code you using.
— Reply to this email directly, view it on GitHub https://github.com/m1maker/SRAL/issues/9#issuecomment-2438936545 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMZN3ZLVT42WBPRYYNKBI3Z5K5FPAVCNFSM6AAAAABQUBKGM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZYHEZTMNJUGU . You are receiving this because you authored the thread.Message ID: @.***>
I also want to mention that you should probably put SAPI all the way at the end of the list, even after UIA. So the order should be something like NVDA, JAWS, UIA, SAPI. For reference, I was looking in sral.cpp at the initialize function where you push back each engine into a vector.
Okay. Try to use latest commit.
I’ve got question. Since I use the python bindings, is there a certain way I have to build the library? I tried on an older version to write my own bindings before there were any, and ctypes couldn’t load the dll.
From: M_maker @.> Sent: Friday, October 25, 2024 18:09 To: m1maker/SRAL @.> Cc: blindgoofball @.>; Author @.> Subject: Re: [m1maker/SRAL] The library does not detect Jws before SAPI when using the python bindings. (Issue #9)
Okay. Try to use latest commit.
— Reply to this email directly, view it on GitHub https://github.com/m1maker/SRAL/issues/9#issuecomment-2438948203 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMZN33G23CDFMI7BA42VUDZ5K6QPAVCNFSM6AAAAABQUBKGM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZYHE2DQMRQGM . You are receiving this because you authored the thread.Message ID: @.***>
The library in the Release folder. Also, you can check how CTypes loading DLL at
Sral::__init__()
.
This appears to have fixed the issue. However, it seems like the dll I get from building is different from the one you are getting, as python can’t load it, even if I make sure it has the same name. To build it, I run cmake with the argument to specify mingw makefiles. Then I just run make. Are there other arguments you pass to it?
From: M_maker @.> Sent: Friday, October 25, 2024 18:25 To: m1maker/SRAL @.> Cc: blindgoofball @.>; Author @.> Subject: Re: [m1maker/SRAL] The library does not detect Jws before SAPI when using the python bindings. (Issue #9)
The library in the Release folder. Also, you can check how CTypes loading DLL at Sral::init().
— Reply to this email directly, view it on GitHub https://github.com/m1maker/SRAL/issues/9#issuecomment-2438962737 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMZN34PAJL7SJIIFWKDLN3Z5LAKVAVCNFSM6AAAAABQUBKGM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZYHE3DENZTG4 . You are receiving this because you authored the thread.Message ID: @.***>
Perhaps you are running SRAL on a 32 bit system? What specific error does it give?
I am running on a 64bit system with 64bit python and a 64bit compiler. When I load it into python it just says something like: “could not find sral or one of its dependancies”.
From: M_maker @.> Sent: Friday, October 25, 2024 18:38 To: m1maker/SRAL @.> Cc: blindgoofball @.>; Author @.> Subject: Re: [m1maker/SRAL] The library does not detect Jws before SAPI when using the python bindings. (Issue #9)
Perhaps you are running SRAL on a 32 bit system? What specific error does it give?
— Reply to this email directly, view it on GitHub https://github.com/m1maker/SRAL/issues/9#issuecomment-2438973496 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMZN3YAYQPGRFQMXP3ZKWDZ5LB6DAVCNFSM6AAAAABQUBKGM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZYHE3TGNBZGY . You are receiving this because you authored the thread.Message ID: @.***>
This strange. DLL should be placed with sral.py file. I building via these commands:
cmake -B build
cmake --build build --config Release
Thank you. It appears to be building correctly now, and JAWS works as expected.
It appears that SAPI, or some other engine that speaks with SAPI, takes presidence over JAWS in the auto detection on windows. When I initialized the libary with the python bindings, it will use NVDA, but it won't use JAWS.