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

Java and .NET binaries #2206

Open
cvb941 opened this issue Apr 27, 2022 · 3 comments
Open

Java and .NET binaries #2206

cvb941 opened this issue Apr 27, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@cvb941
Copy link

cvb941 commented Apr 27, 2022

Hello,

I've been trying to use the STT library in Java on desktop, as the docs website mentions it is possible. However, I can only find .aar binaries, which are according to my knowledge usable only on Android, not desktop.

Is it possible to build .jar files too? On another note, do you have any plans to publish the artifacts on maven, so that the library can be easily used in Java/Android projects? If it is already published, I can't seem to find it.

After failing with Java, I have tried to setup the STT library in .NET. The .NET example in the examples folder seems to use an STT NuGet package, which does not seem to be available anymore. Can the Coqui STT NuGet package be made available too?

I also had trouble finding the .NET binaries in the Releases page, how would I get them from there?

Thank you.

@cvb941 cvb941 added the enhancement New feature or request label Apr 27, 2022
@joreg
Copy link

joreg commented Aug 21, 2022

what worked for me to get it running in .NET is this:

  • check out this repo
  • build native_client\dotnet\STT.sln
  • this builds the STTClient.dll
  • then from the Releases get the libstt.tflite.windows.zip file which has the needed .so files

@botaurus
Copy link

botaurus commented Nov 13, 2022

I'm trying to get the .net native_client working (in Unity). I build the STTclient.dll and acquired the libstt.tflite.windows.zip .so files and put them in the project. I get a 'DllNotFoundException: libstt.so assembly: type: member:(null)' error though, any ideas? Do I need the .so files referenced when I build the dotnet native_client dlls?
thank you

edit: I renamed the .so to .dll and it worked

@jzebedee
Copy link

jzebedee commented Mar 8, 2023

The libstt.so and libkenlm.so in the libstt.tflite.Windows archive are both Windows DLLs:

> wsl file libstt.so
libstt.so: PE32+ executable (DLL) (console) x86-64, for MS Windows
> wsl file libkenlm.so
libkenlm.so: PE32+ executable (DLL) (console) x86-64, for MS Windows

But confusingly, libstt.so has a hard dependency on libkenlm.so (exactly). Renaming both of these with .dll extensions will lead to this error:

Unhandled exception. System.DllNotFoundException: Unable to load DLL 'libstt' or one of its dependencies: The specified module could not be found. (0x8007007E)

Loading these libraries on Windows with the default .NET DllImport behavior means either specifying the import with the .so extension:
[DllImport("libstt.so")]

Or else renaming libstt.so to libstt.dll but not renaming libkenlm.so:
[DllImport("libstt")]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants