Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest version on Windows gives UnsatisfiedLinkError in com.microsoft.cognitiveservices.speech.SpeechConfig #97

Open
bertfrees opened this issue Jul 1, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@bertfrees
Copy link
Member

bertfrees commented Jul 1, 2024

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.

@bertfrees bertfrees added the bug Something isn't working label Jul 1, 2024
@bertfrees bertfrees changed the title Latest version gives UnsatisfiedLinkError in com.microsoft.cognitiveservices.speech.SpeechConfig on Windows Latest version on Windows gives UnsatisfiedLinkError in com.microsoft.cognitiveservices.speech.SpeechConfig Jul 1, 2024
@bertfrees
Copy link
Member Author

@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.

@bertfrees
Copy link
Member Author

@NPavie does #105 have anything to do with this?

@NPavie
Copy link
Contributor

NPavie commented Sep 23, 2024

@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.

@NPavie
Copy link
Contributor

NPavie commented Sep 23, 2024

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

@NPavie
Copy link
Contributor

NPavie commented Sep 25, 2024

@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) !

@bertfrees
Copy link
Member Author

OK. Well let's do that than.

@bertfrees bertfrees assigned bertfrees and unassigned NPavie Oct 7, 2024
@bertfrees bertfrees removed this from the v1.14.19 milestone Oct 10, 2024
@bertfrees
Copy link
Member Author

I have done the client SDK update locally.

bertfrees added a commit that referenced this issue Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Status: In Progress
Development

No branches or pull requests

2 participants