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.38k stars 1.04k forks source link

VOSK golang example out of the box issue #1419

Open borod opened 11 months ago

borod commented 11 months ago

I am currently working on building an example in Golang, following the instructions provided in the relevant README file. However, I have encountered an error and would greatly appreciate your assistance in resolving it.

The error I am facing is as follows: Input

shell
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

shell
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

I have carefully followed the installation and setup instructions outlined in the README, but I am still unable to overcome this issue. I believe that your expertise and guidance will be instrumental in troubleshooting and resolving this error.

Thank you in advance for your kind support and assistance in addressing this matter. I am looking forward to your prompt response.

@nshmyrev (https://github.com/alphacep/vosk-api/pull/1346

nshmyrev commented 11 months ago

In readme it is a single command line. If you want multiple lines you need to export variables like this:

export LD_LIBRARY_PATH=$VOSK_PATH