Closed MrFish1604 closed 4 years ago
It is a bad idea to include kaldi in sources. You'd better compile it separately with standard build process and link to kaldi libraries properly.
Let me know if you need further help on this.
I built kaldi last day like it's explain in the readme.
Then I did that :
I built my program with this command :
g++ src/myownprgm.cpp src/kaldi_recognizer.cc src/model.cc src/spk_model.cc src/vosk_api.cc -I./include/ -L./lib/ -L/lib/arm-linux-gnueabihf/ -lkaldi-base -lkaldi-chain -lkaldi-cudamatrix -lkaldi-decoder -lkaldi-feat -lkaldi-fstext -lkaldi-gmm -lkaldi-hmm -lkaldi-ivector -lkaldi-kws -lkaldi-lat -lkaldi-lm -lkaldi-matrix -lkaldi-nnet -lkaldi-nnet2 -lkaldi-sgmm2 -lkaldi-transform -lkaldi-tree -lkaldi-util -lfst -lfstfar -lfstfarscript -lfstlookahead -lfstngram -lfstscript -lopenblas -lopenblas_armv7-r0.3.7 -L/lib/arm-linux-gnueabihf/ -ldl -o ./bin/V
But it failed and I got this output :
In file included from /usr/include/c++/8/vector:64,
from ./include/vosk/../base/kaldi-common.h:30,
from ./include/vosk/kaldi_recognizer.h:15,
from src/kaldi_recognizer.cc:15:
/usr/include/c++/8/bits/stl_vector.h: In member function 'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = double; _Alloc = std::allocator<double>]':
/usr/include/c++/8/bits/stl_vector.h:847:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector<double> >' changed in GCC 7.1
_M_fill_insert(end(), __new_size - size(), __x);
^~~~~~~~~~~~~~
In file included from /usr/include/c++/8/map:61,
from ./include/vosk/../util/../util/parse-options.h:25,
from ./include/vosk/../util/common-utils.h:23,
from ./include/vosk/kaldi_recognizer.h:16,
from src/kaldi_recognizer.cc:15:
/usr/include/c++/8/bits/stl_map.h: In member function 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = json::JSON; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >]':
/usr/include/c++/8/bits/stl_map.h:499:8: note: parameter passing for argument of type 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, json::JSON>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> > >::const_iterator' {aka 'std::_Rb_tree_const_iterator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >'} changed in GCC 7.1
__i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
In file included from /usr/include/c++/8/vector:69,
from ./include/vosk/../base/kaldi-common.h:30,
from ./include/vosk/kaldi_recognizer.h:15,
from src/kaldi_recognizer.cc:15:
/usr/include/c++/8/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_fill_insert(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = double; _Alloc = std::allocator<double>]':
/usr/include/c++/8/bits/vector.tcc:478:5: note: parameter passing for argument of type 'std::vector<double>::iterator' {aka '__gnu_cxx::__normal_iterator<double*, std::vector<double> >'} changed in GCC 7.1
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/map:60,
from ./include/vosk/../util/../util/parse-options.h:25,
from ./include/vosk/../util/common-utils.h:23,
from ./include/vosk/kaldi_recognizer.h:16,
from src/kaldi_recognizer.cc:15:
/usr/include/c++/8/bits/stl_tree.h: In member function 'void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_II, _II) [with _InputIterator = std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >; _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, json::JSON>; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >]':
/usr/include/c++/8/bits/stl_tree.h:2468:4: note: parameter passing for argument of type 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, json::JSON>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> > >::const_iterator' {aka 'std::_Rb_tree_const_iterator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >'} changed in GCC 7.1
_M_insert_unique_(end(), *__first, __an);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h: In member function 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>, std::tuple<>}; _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, json::JSON>; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >]':
/usr/include/c++/8/bits/stl_tree.h:2411:7: note: parameter passing for argument of type 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, json::JSON>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> > >::const_iterator' {aka 'std::_Rb_tree_const_iterator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >'} changed in GCC 7.1
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:63,
from ./include/vosk/../base/kaldi-common.h:30,
from ./include/vosk/kaldi_recognizer.h:15,
from src/kaldi_recognizer.cc:15:
/usr/include/c++/8/bits/stl_uninitialized.h: In function '_ForwardIterator std::__uninitialized_move_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = double*; _ForwardIterator = double*; _Allocator = std::allocator<double>]':
/usr/include/c++/8/bits/stl_uninitialized.h:297:41: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
return std::__uninitialized_copy_a(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_GLIBCXX_MAKE_MOVE_ITERATOR(__last),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__result, __alloc);
~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In function '_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = double*; _ForwardIterator = double*; _Allocator = std::allocator<double>]':
/usr/include/c++/8/bits/stl_uninitialized.h:311:2: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
return std::__uninitialized_copy_a
~~~~~~~~~~~~~~~~~~~~~~~~~~~
(_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__first),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__last), __result, __alloc);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/map:60,
from ./include/vosk/../util/../util/parse-options.h:25,
from ./include/vosk/../util/common-utils.h:23,
from ./include/vosk/kaldi_recognizer.h:16,
from src/kaldi_recognizer.cc:15:
/usr/include/c++/8/bits/stl_tree.h: In member function 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique_(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Arg&&, _NodeGen&) [with _Arg = std::pair<const std::__cxx11::basic_string<char>, json::JSON>&; _NodeGen = std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, json::JSON>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> > >::_Alloc_node; _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, json::JSON>; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >]':
/usr/include/c++/8/bits/stl_tree.h:2207:7: note: parameter passing for argument of type 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, json::JSON>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> > >::const_iterator' {aka 'std::_Rb_tree_const_iterator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >'} changed in GCC 7.1
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h: In member function 'std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, json::JSON>; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >]':
/usr/include/c++/8/bits/stl_tree.h:2146:5: note: parameter passing for argument of type 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, json::JSON>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> > >::const_iterator' {aka 'std::_Rb_tree_const_iterator<std::pair<const std::__cxx11::basic_string<char>, json::JSON> >'} changed in GCC 7.1
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:63,
from ./include/vosk/../base/kaldi-common.h:30,
from ./include/vosk/kaldi_recognizer.h:15,
from src/kaldi_recognizer.cc:15:
/usr/include/c++/8/bits/stl_uninitialized.h: In function '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = std::move_iterator<double*>; _ForwardIterator = double*; _Tp = double]':
/usr/include/c++/8/bits/stl_uninitialized.h:287:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:287:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:289:37: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
{ return std::uninitialized_copy(__first, __last, __result); }
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In function '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<double*>; _ForwardIterator = double*]':
/usr/include/c++/8/bits/stl_uninitialized.h:115:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
uninitialized_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:115:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:134:15: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
return std::__uninitialized_copy<__is_trivial(_ValueType1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __is_trivial(_ValueType2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __assignable>::
~~~~~~~~~~~~~~~~~~
__uninit_copy(__first, __last, __result);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In static member function 'static _ForwardIterator std::__uninitialized_copy<true>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<double*>; _ForwardIterator = double*]':
/usr/include/c++/8/bits/stl_uninitialized.h:99:9: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
__uninit_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:99:9: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:101:27: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
{ return std::copy(__first, __last, __result); }
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
from ./include/vosk/../base/kaldi-common.h:30,
from ./include/vosk/kaldi_recognizer.h:15,
from src/kaldi_recognizer.cc:15:
/usr/include/c++/8/bits/stl_vector.h: In function 'bool std::operator==(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator<double>]':
/usr/include/c++/8/bits/stl_vector.h:1755:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const double*, std::vector<double> >' changed in GCC 7.1
&& std::equal(__x.begin(), __x.end(), __y.begin())); }
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from ./include/vosk/../base/kaldi-common.h:26,
from ./include/vosk/kaldi_recognizer.h:15,
from src/kaldi_recognizer.cc:15:
/usr/include/c++/8/bits/stl_algobase.h: In function '_OI std::copy(_II, _II, _OI) [with _II = std::move_iterator<double*>; _OI = double*]':
/usr/include/c++/8/bits/stl_algobase.h:446:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
copy(_II __first, _II __last, _OI __result)
^~~~
/usr/include/c++/8/bits/stl_algobase.h:446:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
/usr/include/c++/8/bits/stl_algobase.h: In function 'bool std::equal(_II1, _II1, _II2) [with _II1 = __gnu_cxx::__normal_iterator<const double*, std::vector<double> >; _II2 = __gnu_cxx::__normal_iterator<const double*, std::vector<double> >]':
/usr/include/c++/8/bits/stl_algobase.h:1039:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const double*, std::vector<double> >' changed in GCC 7.1
equal(_II1 __first1, _II1 __last1, _II2 __first2)
^~~~~
/usr/include/c++/8/bits/stl_algobase.h:1039:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const double*, std::vector<double> >' changed in GCC 7.1
/usr/include/c++/8/bits/stl_algobase.h:1039:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const double*, std::vector<double> >' changed in GCC 7.1
In file included from /usr/include/c++/8/bits/stl_algobase.h:67,
from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from ./include/vosk/../base/kaldi-common.h:26,
from ./include/vosk/kaldi_recognizer.h:15,
from src/kaldi_recognizer.cc:15:
/usr/include/c++/8/bits/stl_iterator.h: In function 'decltype (std::__miter_base(__it.base())) std::__miter_base(std::move_iterator<_IteratorL>) [with _Iterator = double*]':
/usr/include/c++/8/bits/stl_iterator.h:1238:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
__miter_base(move_iterator<_Iterator> __it)
^~~~~~~~~~~~
/usr/include/c++/8/bits/stl_iterator.h: In function '_Iterator std::__niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container>) [with _Iterator = const double*; _Container = std::vector<double>]':
/usr/include/c++/8/bits/stl_iterator.h:987:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const double*, std::vector<double> >' changed in GCC 7.1
__niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it)
^~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:63,
from ./include/vosk/../base/kaldi-common.h:30,
from ./include/vosk/model.h:18,
from src/model.cc:31:
/usr/include/c++/8/bits/stl_uninitialized.h: In function '_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = double*; _ForwardIterator = double*; _Allocator = std::allocator<double>]':
/usr/include/c++/8/bits/stl_uninitialized.h:311:2: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
return std::__uninitialized_copy_a
~~~~~~~~~~~~~~~~~~~~~~~~~~~
(_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__first),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__last), __result, __alloc);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In function '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = std::move_iterator<double*>; _ForwardIterator = double*; _Tp = double]':
/usr/include/c++/8/bits/stl_uninitialized.h:287:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:287:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:289:37: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
{ return std::uninitialized_copy(__first, __last, __result); }
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In function '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<double*>; _ForwardIterator = double*]':
/usr/include/c++/8/bits/stl_uninitialized.h:115:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
uninitialized_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:115:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:134:15: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
return std::__uninitialized_copy<__is_trivial(_ValueType1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __is_trivial(_ValueType2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __assignable>::
~~~~~~~~~~~~~~~~~~
__uninit_copy(__first, __last, __result);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In static member function 'static _ForwardIterator std::__uninitialized_copy<true>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<double*>; _ForwardIterator = double*]':
/usr/include/c++/8/bits/stl_uninitialized.h:99:9: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
__uninit_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:99:9: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:101:27: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
{ return std::copy(__first, __last, __result); }
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from ./include/vosk/../base/kaldi-common.h:26,
from ./include/vosk/model.h:18,
from src/model.cc:31:
/usr/include/c++/8/bits/stl_algobase.h: In function '_OI std::copy(_II, _II, _OI) [with _II = std::move_iterator<double*>; _OI = double*]':
/usr/include/c++/8/bits/stl_algobase.h:446:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
copy(_II __first, _II __last, _OI __result)
^~~~
/usr/include/c++/8/bits/stl_algobase.h:446:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
In file included from /usr/include/c++/8/bits/stl_algobase.h:67,
from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from ./include/vosk/../base/kaldi-common.h:26,
from ./include/vosk/model.h:18,
from src/model.cc:31:
/usr/include/c++/8/bits/stl_iterator.h: In function 'decltype (std::__miter_base(__it.base())) std::__miter_base(std::move_iterator<_IteratorL>) [with _Iterator = double*]':
/usr/include/c++/8/bits/stl_iterator.h:1238:5: note: parameter passing for argument of type 'std::move_iterator<double*>' changed in GCC 7.1
__miter_base(move_iterator<_Iterator> __it)
^~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
from ./include/vosk/../base/kaldi-common.h:30,
from ./include/vosk/model.h:18,
from src/model.cc:31:
/usr/include/c++/8/bits/stl_vector.h: In member function 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = double; _Alloc = std::allocator<double>]':
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector<double> >' changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:69,
from ./include/vosk/../base/kaldi-common.h:30,
from ./include/vosk/model.h:18,
from src/model.cc:31:
/usr/include/c++/8/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]':
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type 'std::vector<double>::iterator' {aka '__gnu_cxx::__normal_iterator<double*, std::vector<double> >'} changed in GCC 7.1
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `KaldiRecognizer::KaldiRecognizer(Model*, float)':
kaldi_recognizer.cc:(.text+0x1aa0): undefined reference to `kaldi::OnlineNnet2FeaturePipeline::OnlineNnet2FeaturePipeline(kaldi::OnlineNnet2FeaturePipelineInfo const&)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x1ae0): undefined reference to `kaldi::OnlineSilenceWeighting::OnlineSilenceWeighting(kaldi::TransitionModel const&, kaldi::OnlineSilenceWeightingConfig const&, int)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x1c3c): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::SingleUtteranceNnet3DecoderTpl(kaldi::LatticeFasterDecoderConfig const&, kaldi::TransitionModel const&, kaldi::nnet3::DecodableNnetSimpleLoopedInfo const&, fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > const&, kaldi::OnlineNnet2FeaturePipeline*)'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `KaldiRecognizer::KaldiRecognizer(Model*, float, char const*)':
kaldi_recognizer.cc:(.text+0x1d6c): undefined reference to `kaldi::OnlineNnet2FeaturePipeline::OnlineNnet2FeaturePipeline(kaldi::OnlineNnet2FeaturePipelineInfo const&)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x1dac): undefined reference to `kaldi::OnlineSilenceWeighting::OnlineSilenceWeighting(kaldi::TransitionModel const&, kaldi::OnlineSilenceWeightingConfig const&, int)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x21b0): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::SingleUtteranceNnet3DecoderTpl(kaldi::LatticeFasterDecoderConfig const&, kaldi::TransitionModel const&, kaldi::nnet3::DecodableNnetSimpleLoopedInfo const&, fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > const&, kaldi::OnlineNnet2FeaturePipeline*)'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `KaldiRecognizer::KaldiRecognizer(Model*, SpkModel*, float)':
kaldi_recognizer.cc:(.text+0x2334): undefined reference to `kaldi::OnlineNnet2FeaturePipeline::OnlineNnet2FeaturePipeline(kaldi::OnlineNnet2FeaturePipelineInfo const&)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x2374): undefined reference to `kaldi::OnlineSilenceWeighting::OnlineSilenceWeighting(kaldi::TransitionModel const&, kaldi::OnlineSilenceWeightingConfig const&, int)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x24d0): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::SingleUtteranceNnet3DecoderTpl(kaldi::LatticeFasterDecoderConfig const&, kaldi::TransitionModel const&, kaldi::nnet3::DecodableNnetSimpleLoopedInfo const&, fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > const&, kaldi::OnlineNnet2FeaturePipeline*)'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `KaldiRecognizer::CleanUp()':
kaldi_recognizer.cc:(.text+0x2878): undefined reference to `kaldi::OnlineSilenceWeighting::OnlineSilenceWeighting(kaldi::TransitionModel const&, kaldi::OnlineSilenceWeightingConfig const&, int)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x2890): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::NumFramesDecoded() const'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x28c4): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::InitDecoding(int)'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `KaldiRecognizer::UpdateSilenceWeights()':
kaldi_recognizer.cc:(.text+0x29a0): undefined reference to `void kaldi::OnlineSilenceWeighting::ComputeCurrentTraceback<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >(kaldi::LatticeFasterOnlineDecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > > const&)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x29f0): undefined reference to `kaldi::OnlineSilenceWeighting::GetDeltaWeights(int, int, std::vector<std::pair<int, float>, std::allocator<std::pair<int, float> > >*)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x2a08): undefined reference to `kaldi::OnlineNnet2FeaturePipeline::UpdateFrameWeights(std::vector<std::pair<int, float>, std::allocator<std::pair<int, float> > > const&)'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `KaldiRecognizer::AcceptWaveform(kaldi::Vector<float>&)':
kaldi_recognizer.cc:(.text+0x2d48): undefined reference to `kaldi::OnlineNnet2FeaturePipeline::AcceptWaveform(float, kaldi::VectorBase<float> const&)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x2d60): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::AdvanceDecoding()'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x2dc4): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::EndpointDetected(kaldi::OnlineEndpointConfig const&)'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `RunNnetComputation(kaldi::MatrixBase<float> const&, kaldi::nnet3::Nnet const&, kaldi::nnet3::CachingOptimizingCompiler*, kaldi::Vector<float>*)':
kaldi_recognizer.cc:(.text+0x2e5c): undefined reference to `kaldi::nnet3::IoSpecification::IoSpecification(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x2f08): undefined reference to `kaldi::nnet3::IoSpecification::Swap(kaldi::nnet3::IoSpecification*)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x2f1c): undefined reference to `kaldi::nnet3::CachingOptimizingCompiler::Compile(kaldi::nnet3::ComputationRequest const&)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x2f58): undefined reference to `kaldi::nnet3::NnetComputer::NnetComputer(kaldi::nnet3::NnetComputeOptions const&, kaldi::nnet3::NnetComputation const&, kaldi::nnet3::Nnet const&, kaldi::nnet3::Nnet*)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x2fa0): undefined reference to `kaldi::nnet3::NnetComputer::AcceptInput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, kaldi::CuMatrix<float>*)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x2fc4): undefined reference to `kaldi::nnet3::NnetComputer::Run()'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x3004): undefined reference to `kaldi::nnet3::NnetComputer::GetOutputDestructive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, kaldi::CuMatrix<float>*)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x3088): undefined reference to `kaldi::nnet3::NnetComputer::~NnetComputer()'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x314c): undefined reference to `kaldi::nnet3::NnetComputer::~NnetComputer()'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `KaldiRecognizer::GetSpkVector(kaldi::Vector<float>&)':
kaldi_recognizer.cc:(.text+0x3388): undefined reference to `kaldi::nnet3::CachingOptimizingCompiler::CachingOptimizingCompiler(kaldi::nnet3::Nnet const&, kaldi::nnet3::NnetOptimizeOptions const&, kaldi::nnet3::CachingOptimizingCompilerOptions)'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x33b0): undefined reference to `kaldi::nnet3::CachingOptimizingCompiler::~CachingOptimizingCompiler()'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x33e8): undefined reference to `kaldi::nnet3::CachingOptimizingCompiler::~CachingOptimizingCompiler()'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `KaldiRecognizer::Result()':
kaldi_recognizer.cc:(.text+0x3450): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::FinalizeDecoding()'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x346c): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::NumFramesDecoded() const'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x34d8): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::GetLattice(bool, fst::VectorFst<fst::ArcTpl<fst::CompactLatticeWeightTpl<fst::LatticeWeightTpl<float>, int> >, fst::VectorState<fst::ArcTpl<fst::CompactLatticeWeightTpl<fst::LatticeWeightTpl<float>, int> >, std::allocator<fst::ArcTpl<fst::CompactLatticeWeightTpl<fst::LatticeWeightTpl<float>, int> > > > >*) const'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `KaldiRecognizer::PartialResult()':
kaldi_recognizer.cc:(.text+0x40e0): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::NumFramesDecoded() const'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x4204): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::GetBestPath(bool, fst::VectorFst<fst::ArcTpl<fst::LatticeWeightTpl<float> >, fst::VectorState<fst::ArcTpl<fst::LatticeWeightTpl<float> >, std::allocator<fst::ArcTpl<fst::LatticeWeightTpl<float> > > > >*) const'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `KaldiRecognizer::FinalResult()':
kaldi_recognizer.cc:(.text+0x45a8): undefined reference to `kaldi::OnlineNnet2FeaturePipeline::InputFinished()'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x45c0): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::AdvanceDecoding()'
/usr/bin/ld: kaldi_recognizer.cc:(.text+0x45d0): undefined reference to `kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::FinalizeDecoding()'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `kaldi::nnet3::DecodableNnetLoopedOnlineBase::~DecodableNnetLoopedOnlineBase()':
kaldi_recognizer.cc:(.text._ZN5kaldi5nnet329DecodableNnetLoopedOnlineBaseD2Ev[_ZN5kaldi5nnet329DecodableNnetLoopedOnlineBaseD5Ev]+0x28): undefined reference to `kaldi::nnet3::NnetComputer::~NnetComputer()'
/usr/bin/ld: kaldi_recognizer.cc:(.text._ZN5kaldi5nnet329DecodableNnetLoopedOnlineBaseD2Ev[_ZN5kaldi5nnet329DecodableNnetLoopedOnlineBaseD5Ev]+0x58): undefined reference to `vtable for kaldi::nnet3::DecodableNnetLoopedOnlineBase'
/usr/bin/ld: /tmp/ccKy0bxe.o: in function `kaldi::nnet3::DecodableAmNnetLoopedOnline::~DecodableAmNnetLoopedOnline()':
kaldi_recognizer.cc:(.text._ZN5kaldi5nnet327DecodableAmNnetLoopedOnlineD2Ev[_ZN5kaldi5nnet327DecodableAmNnetLoopedOnlineD5Ev]+0x38): undefined reference to `vtable for kaldi::nnet3::DecodableAmNnetLoopedOnline'
/usr/bin/ld: /tmp/ccrDjqjf.o: in function `Model::ConfigureV1()':
model.cc:(.text+0x8cc): undefined reference to `kaldi::OnlineIvectorExtractionInfo::Init(kaldi::OnlineIvectorExtractionConfig const&)'
/usr/bin/ld: /tmp/ccrDjqjf.o: in function `Model::ConfigureV2()':
model.cc:(.text+0xf8c): undefined reference to `kaldi::OnlineIvectorExtractionInfo::Init(kaldi::OnlineIvectorExtractionConfig const&)'
/usr/bin/ld: /tmp/ccrDjqjf.o: in function `Model::ReadDataFiles()':
model.cc:(.text+0x1358): undefined reference to `kaldi::nnet3::AmNnetSimple::Read(std::istream&, bool)'
/usr/bin/ld: model.cc:(.text+0x1378): undefined reference to `kaldi::nnet3::SetBatchnormTestMode(bool, kaldi::nnet3::Nnet*)'
/usr/bin/ld: model.cc:(.text+0x1398): undefined reference to `kaldi::nnet3::SetDropoutTestMode(bool, kaldi::nnet3::Nnet*)'
/usr/bin/ld: model.cc:(.text+0x13d0): undefined reference to `kaldi::nnet3::CollapseModel(kaldi::nnet3::CollapseModelConfig const&, kaldi::nnet3::Nnet*)'
/usr/bin/ld: model.cc:(.text+0x140c): undefined reference to `kaldi::nnet3::DecodableNnetSimpleLoopedInfo::DecodableNnetSimpleLoopedInfo(kaldi::nnet3::NnetSimpleLoopedComputationOptions const&, kaldi::nnet3::AmNnetSimple*)'
/usr/bin/ld: /tmp/ccrDjqjf.o: in function `kaldi::nnet3::Descriptor::~Descriptor()':
model.cc:(.text._ZN5kaldi5nnet310DescriptorD2Ev[_ZN5kaldi5nnet310DescriptorD5Ev]+0x14): undefined reference to `kaldi::nnet3::Descriptor::Destroy()'
/usr/bin/ld: /tmp/ccrDjqjf.o: in function `kaldi::nnet3::Nnet::~Nnet()':
model.cc:(.text._ZN5kaldi5nnet34NnetD2Ev[_ZN5kaldi5nnet34NnetD5Ev]+0x14): undefined reference to `kaldi::nnet3::Nnet::Destroy()'
/usr/bin/ld: /tmp/ccrDjqjf.o: in function `kaldi::OnlineNnet2FeaturePipelineInfo::OnlineNnet2FeaturePipelineInfo()':
model.cc:(.text._ZN5kaldi30OnlineNnet2FeaturePipelineInfoC2Ev[_ZN5kaldi30OnlineNnet2FeaturePipelineInfoC5Ev]+0xd4): undefined reference to `kaldi::OnlineIvectorExtractionInfo::OnlineIvectorExtractionInfo()'
/usr/bin/ld: /tmp/ccrDjqjf.o: in function `kaldi::nnet3::DecodableNnetSimpleLoopedInfo::~DecodableNnetSimpleLoopedInfo()':
model.cc:(.text._ZN5kaldi5nnet329DecodableNnetSimpleLoopedInfoD2Ev[_ZN5kaldi5nnet329DecodableNnetSimpleLoopedInfoD5Ev]+0x1c): undefined reference to `kaldi::nnet3::NnetComputation::~NnetComputation()'
/usr/bin/ld: /tmp/ccRDGq2t.o: in function `SpkModel::SpkModel(char const*)':
spk_model.cc:(.text+0xe0): undefined reference to `kaldi::nnet3::SetBatchnormTestMode(bool, kaldi::nnet3::Nnet*)'
/usr/bin/ld: spk_model.cc:(.text+0xf0): undefined reference to `kaldi::nnet3::SetDropoutTestMode(bool, kaldi::nnet3::Nnet*)'
/usr/bin/ld: spk_model.cc:(.text+0x110): undefined reference to `kaldi::nnet3::CollapseModel(kaldi::nnet3::CollapseModelConfig const&, kaldi::nnet3::Nnet*)'
/usr/bin/ld: /tmp/ccRDGq2t.o: in function `void kaldi::ReadKaldiObject<kaldi::nnet3::Nnet>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, kaldi::nnet3::Nnet*)':
spk_model.cc:(.text._ZN5kaldi15ReadKaldiObjectINS_5nnet34NnetEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPT_[_ZN5kaldi15ReadKaldiObjectINS_5nnet34NnetEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPT_]+0x44): undefined reference to `kaldi::nnet3::Nnet::Read(std::istream&, bool)'
collect2: error: ld returned 1 exit status
Thank for your help.
Add -std=c++11 -DFST_NO_DYNAMIC_LINKING
to compiler flags.
I get the same error.
The order of libraries in -l is also important, libonline should be first. Refer the order from our makefiles.
I added kaldi-nnet3.a
into my lib directory and I sort libraries as in https://github.com/alphacep/vosk-api/blob/master/csharp/Makefile. It fixed errors about nnet3.
But I still have errors about online. I don't find kaldi-online2.a
.
It must be inside kaldi/src/online2 ;)
Thank you, but the file does not exist. I rebuild kaldi from this repos https://github.com/kaldi-asr/kaldi rather than https://github.com/alphacep/kaldi. It will take a long time. I'll keep you informed.
I succeed. I did this :
git clone https://github.com/kaldi-asr/kaldi.git
cd kaldi/tools
check and install dependencies
make
cd ../src
./configure --shared
make depend
make
Created this :
find . -name \*.so -exec cp -v {} ../myproject/lib \;
to copy them)I modified the vosk and kaldi's files like that :
Each #include "directory/header.h"
Became #include "../directory/header.h"
build.sh looks like :
g++ src/myownprgm.cpp src/kaldi_recognizer.cc src/model.cc src/spk_model.cc src/vosk_api.cc -I./include/ -L./lib/ -L/lib/arm-linux-gnueabihf/ -lkaldi-online2 -lkaldi-decoder -lkaldi-ivector -lkaldi-gmm -lkaldi-nnet -lkaldi-nnet2 -lkaldi-nnet3 -lkaldi-tree -lkaldi-feat -lkaldi-lat -lkaldi-lm -lkaldi-hmm -lkaldi-transform -lkaldi-cudamatrix -lkaldi-matrix -lkaldi-fstext -lkaldi-util -lkaldi-base -lfst -lfstngram -lopenblas -L/lib/arm-linux-gnueabihf/ -ldl -std=c++11 -o ./bin/V
I just have to run ./build.sh
to build the program.
Thank you for your help
@MrFish1604 congratulations!
I'm trying to build this test program on my raspberry pi 3 :
I have this tree view :
I modified the vosk and kaldi's files like that : Each
#include "directory/header.h"
Became#include "../directory/header.h"
When I run this command :
g++ myownprgm.cpp vosk/vosk_api.cc vosk/kaldi_recognizer.cc vosk/model.cc vosk/spk_model.cc -o testvosk
I get this output :How can I build the program ?