tsengwoody / WorldVoice

Multilingual synthesizers add-on: Automatically switch speech role according to text language; Integrated Espeak, OneCore, RHVoice, SAPI5, Piper speech engine
GNU General Public License v2.0
20 stars 6 forks source link

SayAll is broken in NVDA Alpha. #20

Closed cary-rowen closed 1 month ago

cary-rowen commented 1 month ago

Using NVDA alpha-32997,3f82ab67 (2024.4.0.32997)

Use any of the following shortcut keys:

You will see the following error in the NVDA log:

Input: kb(laptop):NVDA+a
ERROR - scriptHandler.executeScript (22:55:56.514) - MainThread (13436):
error executing script: <bound method GlobalCommands.script_sayAll of <globalCommands.GlobalCommands object at 0x06A8EAF0>> with gesture 'NVDA+a'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 299, in executeScript
  File "globalCommands.pyc", line 2368, in script_sayAll
TypeError: _SayAllHandler.readText() got an unexpected keyword argument 'startedFromScript'
IO - inputCore.executeGesture (22:55:57.243) - winInputHook (9348):
Input: kb(laptop):NVDA+shift+control+f1

I'm guessing you monkey patched the sayAll function, This may be due to changes in nvaccess/nvda/#16826 that exposed this issue

I don't think this is an API breaking change in this case, but is still worth bringing to the attention of add-on developers and PR authors.

cc @CyrilleB79 @tsengwoody

lbk2907 commented 1 month ago

I wish I can help but I don't know how to code. If you know how to fix this, maybe you can make a pull request for that.

CyrilleB79 commented 1 month ago

Yes, very likely due to the introduction of https://github.com/nvaccess/nvda/pull/16826.

The say all code has been copied in this add-on. Since it has been modified in https://github.com/nvaccess/nvda/pull/16826, it should probably also be modified similarly in this add-on.

lbk2907 commented 1 month ago

If you know how to make a pull request, you can do so. Do let me know if you need any help in creating pull request.

CyrilleB79 commented 1 month ago

@lbk2907, I have not investigated in detail the code and I do not plan to do so. I am not a user of this add-on.

I am the author of https://github.com/nvaccess/nvda/pull/16826. @tsengwoody or whoever want to fix this issue can have a look to https://github.com/nvaccess/nvda/pull/16826. If needed, I am available to provide further information to someone wanting to write a fix. But I doubt it will be necessary, since https://github.com/nvaccess/nvda/pull/16826 is not so big.

tsengwoody commented 1 month ago

Fixed: commit 7a72e1