nvda
f32e049e - Support for 32 bit sapi4 and sapi5 via a 32 bit synthDriver runtime (#19432)

Commit
35 days ago
Support for 32 bit sapi4 and sapi5 via a 32 bit synthDriver runtime (#19432) Replaces pr #19412 ### Summary of the issue: With the switch to 64 bit, NVDA no longer supports sapi4, or 32 bit specific sapi5 synthesizers. NVDA should somehow continue to support these synthesizers. ### Description of user facing changes: NvDA continues to support sapi4 and 32 bit specific Sapi5 synthesizers. ### Description of developer facing changes: ### Description of development approach: * Compile nvdaHelperLocal for all archetectures, rather than just for NVDA's core archetecture (x64). NVDA's 32 bit synthDriver host runtime needs nvdaHelperLocal for WASAPI. * Move the wasapi function definitions for nvdaHelperLocal.dll into their own 'wasapi' Python module, so that they can be imported separate to NvDAHelper. NVDA's 32 bit synthDriver host runtime uses WASAPI directly. * Compile sonic independently of eSpeak and for all archetectures (not just x64), as it is needed by sapi5 when running in NVDA's 32 bit synthDriver host runtime. The x86 sonic dll will be placed in source/synthDrivers32. * winBindings.kernel32: add definition for GetCurrentProcessId. Used in logging for NVDA's 32 bit synthDriver host runtime. * Add a jobObject module, which contains a Job class which wraps a win32 Job object, which allows automatically killing any process associated with it. This is sued to ensure that any process started for the 32 bit synthDriver host runtime is killed off if NvDA exits. * Add a _bridge package, which provides a client and runtime for the 32 bit synthDriver host. The client is code that runs in NVDA, and the runtime is code that runs in its own 32 bit child process. Communication between NvDA and the child process is via RPYC over the child processs's standard pipe handles. This _bridge package can be later extended with more clients and runtimes as we start to implement a full ART. * Add 32 bit sapi4 and sapi5 synthDrivers which use the synthDriverHost32 runtime. ### Testing strategy: Manually tested running NvDA with both 32 bit sapi4 (Truevoice and MS Mike Mary Sam) and 32 bit sapi5 (Windows built-in David, eSpeak bridge, Mikropuhe). Ran with NvDA launcher, installed normal user, and on secure desktop (UAC and logon screen). ### Known issues with pull request: * This PR only supports sapi4 and 32 bit sapi5 quite specifically. It is not a generalized 32 bit shim for add-ons. To do this, we would need to include the security features from pr #19412 and greatly increase the size of the runtime, and add many more proxies and services. In other words, complete the secure ART project ;). To have something ready for 2026.1, we have decided to limit this to sapi4 and 32 bit sapi5.
Parents
Loading