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

Error building the library libvosk.so #1136

Closed siliconvallley closed 1 year ago

siliconvallley commented 1 year ago

Reference steps: Building the library libvosk.so

cd git clone -b vosk --single-branch https://github.com/alphacep/kaldi /opt/kaldi cd kaldi/tools make openfst ./extras/install_openblas_clapack.sh cd ../src ./configure --mathlib=OPENBLAS_CLAPACK --shared make -j 10 online2 lm rnnlm cd ../.. git clone https://github.com/alphacep/vosk-api cd vosk-api/src KALDI_ROOT= make

My steps:

cd git clone https://github.com/alphacep/kaldi cd kaldi/tools make openfst // There is no install_openblas_clapack.sh script in kaldi, only install_openblas.sh. // ./extras/install_openblas_clapack.sh
./extras/install_openblas.sh
cd ../src // ./configure --mathlib=OPENBLAS_CLAPACK --shared ./configure --shared make -j 10 online2 lm rnnlm

git clone https://github.com/alphacep/vosk-api cd vosk-api/src KALDI_ROOT= make

Execute the command "KALDI_ROOT= make", and the following exception occurs::

g++ -g -O3 -std=c++17 -Wno-deprecated-declarations -fPIC -DFST_NO_DYNAMICLINKING -I. -I/home/dinghui/code/kaldi/kaldi/src -I/home/dinghui/code/kaldi/kaldi/tools/openfst/include -I/home/dinghui/code/kaldi/kaldi/tools/OpenBLAS/install/include -c -o recognizer.o recognizer.cc recognizer.cc: In member function ‘const char Recognizer::PartialResult()’: recognizer.cc:752:13: error: ‘WordAlignLatticePartial’ was not declared in this scope 752 | WordAlignLatticePartial(clat, model->transmodel, *model->winfo, 0, &aligned_lat); | ^~~~~~~ make: *** [Makefile:112: recognizer.o] Error 1

Please help to solve the current exception, thank you.

nshmyrev commented 1 year ago

You need to follow steps closely, the command was

git clone -b vosk --single-branch https://github.com/alphacep/kaldi /opt/kaldi

siliconvallley commented 1 year ago

You need to follow steps closely, the command was

git clone -b vosk --single-branch https://github.com/alphacep/kaldi /opt/kaldi

Thank you, .so has been compiled.

nshmyrev commented 1 year ago

ok, great

nshmyrev commented 6 months ago

Same as #1082