Open bertfrees opened 4 months ago
@NPavie experiences the same issue after he installed https://github.com/gexgd0419/NaturalVoiceSAPIAdapter/releases/tag/v0.1
Could not initialize class com.microsoft.cognitiveservices.speech.SpeechConfig Exception java.lang.UnsatisfiedLinkError: 'void com.microsoft.cognitiveservices.speech.SpeechConfig.setTempDirectory(java.lang.String)' [in thread "qtp1360393616-68 - /ws/voices"]
The issue disappears if he uninstalls the tool.
@NPavie does https://github.com/daisy/pipeline-modules/pull/105 have anything to do with this?
@bertfrees i'm not sure but it is possible : it seems Microsoft has recently broken some things in their runtime library through several update (there is one breaking change I know about mutex that was reported by the dolphin emulator team, where a new version of the visual studio 2022 redistributable package was needed)
This one is a bit hard to confirm. I'll have to check with latest version of the NaturalVoiceSAPIAdapter just in case and see what i can find.
Just in case, i tested the connector in UI project with the newest version of the tool and the problem still arise.
If i run the adapter's tests the problem does not arise.
Just out of curiosity I compared the function names that are exposed through the original core dll of the client SDK and the patched version of the tool, there are some changes between signatures, but mostly added functions registered in the DLL (but maybe that has a more serious impact that I thought, I don't know for sure)
I'm looking at the loading code within the client SDK, it seems it tries to load the native library from a static initialization block when trying to access the class first. I'm still trying to access it through the debugger to see more precisely where it fails and if it manages to load the java.bindings
and core
@bertfrees so, i'm not sure I identified exactly what is is the issue between the tool, but checking the latest update of NaturalVoiceSapiAdapter (i'll start calling it NVSA) code base, I realized in the code that they switched to the 1.37 version of the azure SDK for the 0.2 version of the tool.
If I update the client SDK to the same version in the pipeline assembly (tested in pipeline-ui), it works again (with the NVSA tool v0.2 installed) !
OK. Well let's do that than.
I have done the client SDK update locally.
It seems that the Microsoft Visual C++ Redistributable for Visual Studio is a dependency of the speech SDK, but we never ensured this.
Perhaps this has something to do with the fact that I dropped the jnaerator dependency. JNA statically links against msvcr100.dll.