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

vosk-api python module build error #17

Closed
meusername opened this issue Jan 17, 2020 · 7 comments
Closed

vosk-api python module build error #17

meusername opened this issue Jan 17, 2020 · 7 comments

Comments

@meusername
Copy link

Hi.
While trying python3 setup.py install

[ 40%] Building CXX object CMakeFiles/_vosk.dir/voskPYTHON_wrap.cxx.o
/usr/bin/c++ -D_vosk_EXPORTS -I/opt/vosk/vosk-api/python/../src -I/opt/vosk/kaldi/src -I/opt/vosk/kaldi/tools/openfst/include -I/usr/include/python3.5m -O3 -DFST_NO_DYNAMIC_LINKING -std=c++11 -O3 -DNDEBUG -fPIC -o CMakeFiles/vosk.dir/voskPYTHON_wrap.cxx.o -c /opt/vosk/vosk-api/python/build/temp.linux-x86_64-3.5/voskPYTHON_wrap.cxx
In file included from /opt/vosk/vosk-api/python/build/temp.linux-x86_64-3.5/voskPYTHON_wrap.cxx:3119:0:
/opt/vosk/vosk-api/python/../src/kaldi_recognizer.h:35:14: error: ‘LookaheadFst’ in namespace ‘fst’ does not name a template type
fst::LookaheadFst<fst::StdArc, int32> *decode_fst
;
^~~~~~~~~~~~
CMakeFiles/_vosk.dir/build.make:62: recipe for target 'CMakeFiles/_vosk.dir/voskPYTHON_wrap.cxx.o' failed
make[3]: *** [CMakeFiles/_vosk.dir/voskPYTHON_wrap.cxx.o] Error 1
make[3]: Leaving directory '/opt/vosk/vosk-api/python/build/temp.linux-x86_64-3.5'
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/_vosk.dir/all' failed
make[2]: *** [CMakeFiles/_vosk.dir/all] Error 2
make[2]: Leaving directory '/opt/vosk/vosk-api/python/build/temp.linux-x86_64-3.5'
CMakeFiles/Makefile2:116: recipe for target 'CMakeFiles/_vosk.dir/rule' failed
make[1]: *** [CMakeFiles/_vosk.dir/rule] Error 2
make[1]: Leaving directory '/opt/vosk/vosk-api/python/build/temp.linux-x86_64-3.5'
Makefile:131: recipe for target '_vosk' failed
make: *** [_vosk] Error 2

@nshmyrev
Copy link
Collaborator

It doesn't seem you have Kaldi build from our branch. Follow the instructions in README if you want to build from source:

https://github.com/alphacep/vosk-api#python-module-build

@meusername
Copy link
Author

Thank's for answer.
The same error.

I clone git repo to /opt/vosk/kaldi and make tools and src with succes. Then i clone vosk-api to /opt/vosk/vosk-api (directory python does not exist in kaldi repo and "cd python" is impossible), set the KALDI_ROOT to /opt/vosk/kaldi, change dir to /opt/vosk/vosk-api/python and try to run "pyton3 setup.py install".

As result i have error.

/opt/vosk/vosk-api/python/../src/kaldi_recognizer.h:35:14: error: ‘LookaheadFst’ in namespace ‘fst’ does not name a template type
fst::LookaheadFst<fst::StdArc, int32> *decode_fst;
^~~~~~~~~~~~
CMakeFiles/_vosk.dir/build.make:62: recipe for target 'CMakeFiles/_vosk.dir/voskPYTHON_wrap.cxx.o' failed

Debian GNU/Linux 9
Python 3.5.3

@nshmyrev
Copy link
Collaborator

You can type git status && git remote -v inside kaldi folder and paste here.

@meusername
Copy link
Author

git status && git remote -v
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add ..." to include in what will be committed)

    tools/OpenBLAS-0.3.7.tar.gz

nothing added to commit but untracked files present (use "git add" to track)
origin https://github.com/alphacep/kaldi.git (fetch)
origin https://github.com/alphacep/kaldi.git (push)

@nshmyrev
Copy link
Collaborator

You need to checkout lookahead branch with git checkout lookahead as instruction says.

@meusername
Copy link
Author

Great! Now that error did goes away.
Thank's alot.

@nshmyrev
Copy link
Collaborator

Ok, it is the same as #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants