alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.73k stars 1.08k forks source link

Error looking up function 'vosk_recognizer_set_grm' #1235

Closed breandan closed 7 months ago

breandan commented 1 year ago

I am filing this issue to report the following error after updating from com.alphacephei:vosk:0.3.38 to com.alphacephei:vosk:0.3.45 (running JVM 17.0.1 on Mac OS X 13.0.1 aarch64):

java.lang.UnsatisfiedLinkError: Error looking up function 'vosk_recognizer_set_grm': dlsym(0x8b31d3b0, vosk_recognizer_set_grm): symbol not found
    at com.sun.jna.Function.<init>(Function.java:252)
    at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:604)
    at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:580)
    at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:566)
    at com.sun.jna.Native.register(Native.java:1904)
    at com.sun.jna.Native.register(Native.java:1775)
    at org.vosk.LibVosk.<clinit>(LibVosk.java:40)
    at org.vosk.Model.<init>(Model.java:11)

cc: @nalbion

nalbion commented 1 year ago

This should work on the next release

nalbion commented 1 year ago

@nshmyrev could you please do a release to Maven central?

I've tried to set up a GitHub pipeline based on the Docker & build scripts here, but I'm not sure how to build for Darwin

https://github.com/OpenASR/idear/blob/master/.github/workflows/deploy.yml

nshmyrev commented 1 year ago

Hi, I'm working on it. Give me few more days to setup OSX compilation please. Originally this issue tracked at

https://github.com/alphacep/vosk-api/issues/1138

vikasthange commented 1 year ago

used java maven dependency version 0.3.45 and still having same error.

timmolter commented 7 months ago

Yes, 0.3.45 is broken on Mac Intel and M1 still:

java.lang.UnsatisfiedLinkError: Error looking up function 'vosk_recognizer_set_grm': dlsym(0x8c453340, vosk_recognizer_set_grm): symbol not found
        at com.sun.jna.Function.<init>(Function.java:252)
        at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:600)
        at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:576)
        at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:562)
nshmyrev commented 7 months ago

Same as https://github.com/alphacep/vosk-api/issues/1422