davidacm / NVDA-IBMTTS-Driver

This project is aimed at developing and maintaining the NVDA IBMTTS driver. IBMTTS is a synthesizer similar to Eloquence. Please send your ideas and contributions here!
GNU General Public License v2.0
56 stars 23 forks source link

problem loading viavoice libraries #75

Closed jdcweb closed 1 year ago

jdcweb commented 2 years ago

hello when I want to load ibmeci dll, I get the error message that the dll is not correct. I've never had this happen to me before. I don't know if it's a bug in the add-on or in my system.

lbk2907 commented 2 years ago

Are that happend when changing the voice path or when choosing IBMTTS from the synthesizer list?

jdcweb commented 2 years ago

no, this happens to change the path of the libraries.

lbk2907 commented 2 years ago

Which version of IBM that you use?

jdcweb commented 2 years ago

if you mean the libraries, I'm using 6.7.3

lbk2907 commented 2 years ago

The one from the IBM FTP site right? I have no issues here.

jdcweb commented 2 years ago

Yes, that's where I downloaded it. It is very strange because before I could use them without errors.

lbk2907 commented 2 years ago

Let’s see if other contributer or maybe @davidacm or @mohamed00 have solution for that.

jdcweb commented 2 years ago

hello. I restored the NVDA factory settings and now I was able to load the library, but now I get the error that the synthesizer cannot be loaded.

lbk2907 commented 2 years ago

Restart NVDA please.

jdcweb commented 2 years ago

Hi. I was able to load the libraries, but now the problem is that the synthesizer is silent, that is to say it freezes NVDA. I leave the log in case it is useful ERROR - stderr (15:44:20.035) - Thread-84 (3872): Exception in thread Thread-84: Traceback (most recent call last):   File "threading.pyc", line 926, in _bootstrap_inner   File "C:\Users\hp\AppData\Roaming\nvda\addons\IBMTTS\synthDrivers_ibmeci.py", line 134, in run     processEciQueue()   File "C:\Users\hp AppData\Roaming\nvda\addons\IBMTTS\synthDrivers_ibmeci.py", line 182, in processEciQueue     func(*args)   File "C:\Users\hp\AppData\Roaming\nvda\addons\IBMTTS\synthDrivers_ibmeci.py", line 335, in speak     dll.eciAddText(handle, text) OSError: exception: access violation writing 0x000006A4

please note that I can use the eloquence libraries without any problem.

Mohamed00 commented 2 years ago

Have you by any chance been using Eloquence and IBMTTS together? The two synths can't run at the same time.

On 8/4/2022 4:52 PM, jose david wrote:

Hi. I was able to load the libraries, but now the problem is that the synthesizer is silent, that is to say it freezes NVDA. I leave the log in case it is useful ERROR - stderr (15:44:20.035) - Thread-84 (3872): Exception in thread Thread-84: Traceback (most recent call last):   File "threading.pyc", line 926, in _bootstrap_inner   File "C:\Users\hp\AppData\Roaming\nvda\addons\IBMTTS\synthDrivers_ibmeci.py", line 134, in run     processEciQueue()   File "C:\Users\hp AppData\Roaming\nvda\addons\IBMTTS\synthDrivers_ibmeci.py", line 182, in processEciQueue     func(*args)   File "C:\Users\hp\AppData\Roaming\nvda\addons\IBMTTS\synthDrivers_ibmeci.py", line 335, in speak     dll.eciAddText(handle, text) OSError: exception: access violation writing 0x000006A4

please note that I can use the eloquence libraries without any problem.

— Reply to this email directly, view it on GitHub https://github.com/davidacm/NVDA-IBMTTS-Driver/issues/75#issuecomment-1205755674, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADY4AYDEJXTKC4QI4YTZKRDVXQURVANCNFSM55M2XRPA. You are receiving this because you were mentioned.Message ID: @.***>

lbk2907 commented 2 years ago

ARE you ment the library itself or the Add-On?

jdcweb commented 2 years ago

no, before loading the IBM addon I switch to another synthesizer. for lbk. I don't understand your question. this happens with the IBM add-on if that's what you're talking about. I've reset the settings to factory defaults, uninstalled and reinstalled and it still doesn't work. it occurs to me that it may be the latest version 2022.2, I will try an earlier version.

lbk2907 commented 2 years ago

Sorry. Forgot to mention. What I mean just now is about the Eloquence. Are @Mohamed00 mean the Eloquence binary itself or the Add-On from another repository that can't used together with IBMTTS?

Mohamed00 commented 2 years ago

The binary itself. Access violation errors like that tend to happen if both synths are running at the same time, example: you load IBMTTS, then try switching to Eloquence without restarting NVDA.

lbk2907 commented 2 years ago

@Mohamed00 I understand. Thanks.

That's mean we need to restart NVDA after switch to the particular binary. Are possible to add an option to unload the binary after we switch to another synthesizer so that we can delete that binary without need to restart NVDA to properly unload it. For example, when I'm install the IBM version 6.7.3.2 and I want to change the ibmeci.dll to version 6.6.1.0, I need to switch to another synthesizer, restart NVDA then proceed to change the binary.

jdcweb commented 2 years ago

I

definitely didn't get the IBM vinary to work. possibly the solution is to reset my windows, but I won't do it since the eloquence vinary works without problems. thank you very much and I consider this problem closed

davidacm commented 2 years ago

Hi. As @Mohamed00 said, is not possible to load two libraries of IBMTTS or eloquence. They share a lot of things because internally, are very similar. Python doesn't have a clear way to unload (to free) a loaded library. But it's possible by using the kernel from windows. Is not a priority for now, at least for me. This was an issue that I found a long time ago, and I think that is the issue you are experimenting now.

I researched about some workarounds when you opened this issue, which I will try when I'm less busy. I think that if we force NVDA to release the library when the driver is terminated, it could solve this issue. But is just a theory from me. I would need to try if this solution works.

lbk2907 commented 2 years ago

Ok, thank you.

Mohamed00 commented 1 year ago

The latest release should fix the problem mentioned in this issue. It was caused by not loading etidev.dll prior to loading ibmeci.dll. Now if etidev.dll exists, it's loaded prior to the ibmeci library.

davidacm commented 1 year ago

I'm not entirely sure that this release fixes the problem. But could help. Many changes were implemented to load the libraries, and now the driver should send more iformation to the log when an error occurs. Is hard to solve a problem that I can't reproduce, but this release would help to load libraries. I would suggest to affected users of this issue to do more tests and report the results here.

etidev.dll is not loaded when the add-on check if the library is correct if loaded from the IBMTTS category setting, I did not implement it yet because this would require even more changes in the code. This could be implemented for the next release. The library is loaded from this dialog to check if at least one ECI api function is present. The problem is, that python doesn't offer a good method to unload the library. When the add-on loads the ibmeci library first, etidev won't be available even if the library is loaded again when the user activates the synthesizer. Even more, if the eci.ini require updates, those won't be seen by eci.dll if this library was loaded before the changes of the file. I even tried with kernel32.FreeLibrary and this did not work to unload ibmeci.

So, if the things don't work and you're sure that the library is correct, for now I'd suggest to restart NVDA after update the path of the library.

Should not be necessary to restart NVDA, but that's can help. Report the issues even if the problem occcurs without restart NVDA.

jdcweb commented 1 year ago

hello @davidacm @Mohamed00 I still can't get the viavoice libraries to work, getting the error that ibmeci could not be loaded. I attach the log in case it is useful please note that I tried to load this synthesizer using espeak I uninstalled and reinstalled the addon, deleting the traces of the addon in the nvda.ini file, and restarted NVDA. nvda.log

Mohamed00 commented 1 year ago

For some reason, it's setting your speech voice to 4294967295, which is invalid. Go into your nvda.ini file, and in the [ibmeci] section, try editing the configuration so it says something like voice = 65536.

jdcweb commented 1 year ago

hello

I managed to load the libraries correctly by resetting the NVDA settings to factory defaults: now the problem is that if we modify an option that requires restarting NVDA, such as changing the interface language, for some strange reason the libraries stop speaking the reader, having to return to the factory settings to work again.

Could you send me privately the most stable viavoice libraries please?