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.57k stars 1.06k forks source link

go: Add SetGrm #1346

Closed johngebbie closed 1 year ago

johngebbie commented 1 year ago

I'm not very familiar with cgo and just based it off the other functions, and it works when I use it in the example.

nshmyrev commented 1 year ago

Great, thank you!

borod commented 1 year ago

Please help :) (followed readme)

console: VOSK_PATH=$(pwd)/vosk-linux-x86_64-0.3.45 LD_LIBRARY_PATH=$VOSK_PATH CGO_CPPFLAGS="-I $VOSK_PATH" CGO_LDFLAGS="-L $VOSK_PATH -lpthread" go run . -f test.wav

output:

github.com/alphacep/vosk-api/go/example

/usr/bin/ld: cannot find -lvosk: No such file or directory /usr/bin/ld: cannot find -lvosk: No such file or directory collect2: error: ld returned 1 exit status

nshmyrev commented 1 year ago

@borod you need to create an issue instead of commenting here