交叉编译用于ARM的Sphinxbase和Pocketsphinx

交叉编译用于ARM的Sphinxbase和Pocketsphinx,arm,cross-compiling,voice-recognition,cmusphinx,pocketsphinx,Arm,Cross Compiling,Voice Recognition,Cmusphinx,Pocketsphinx,我正在尝试使Pocketsphinx在基于ARM的处理器上工作,用于热词检测。因此,我正在Ubuntu PC上交叉编译Sphinxbase和Pocketsphinx for ARM。我能够在64位Ubuntu PC上安装Sphinxbase和Pocketsphinx,并使用以下命令使热词检测正常工作: $/pocketsphinx\u连续-输入是-关键词“天”-kws\u阈值20 但我在交叉编译Sphinxbase时收到错误日志。我首先使用以下命令交叉编译Sphinxbase $/autogen

我正在尝试使Pocketsphinx在基于ARM的处理器上工作,用于热词检测。因此,我正在Ubuntu PC上交叉编译Sphinxbase和Pocketsphinx for ARM。我能够在64位Ubuntu PC上安装Sphinxbase和Pocketsphinx,并使用以下命令使热词检测正常工作:

$/pocketsphinx\u连续-输入是-关键词“天”-kws\u阈值20

但我在交叉编译Sphinxbase时收到错误日志。我首先使用以下命令交叉编译Sphinxbase

$/autogen.sh

$/configure--host=arm-linux-gnueabihf--build=x86_64-linux-gnu--prefix=/home/rakesh/sphinx–不带python

上述命令的部分日志如下所示:

checking for pthread_create in -lpthread... yes
checking pulse/pulseaudio.h usability... no
checking pulse/pulseaudio.h presence... no
checking for pulse/pulseaudio.h... no
checking alsa/asoundlib.h usability... yes
checking alsa/asoundlib.h presence... yes
checking for alsa/asoundlib.h... yes
checking for snd_pcm_open in -lasound... no
checking for doxygen... no
当我发出make命令时,我得到以下错误日志:

../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params_any'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params_sizeof'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params_set_channels'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params_set_rate_near'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_nonblock'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_drop'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_close'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params_set_period_time_near'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params_get_buffer_time_max'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params_set_format'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_start'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_strerror'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params_set_access'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_open'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_resume'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_readi'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_prepare'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params_set_buffer_time_near'
collect2: error: ld returned 1 exit status
Makefile:413: recipe for target 'sphinx_cont_seg' failed
make[2]: *** [sphinx_cont_seg] Error 1
make[2]: Leaving directory '/home/rakesh/Sphinx/sphinxbase/src/sphinx_adtools'
Makefile:374: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/rakesh/Sphinx/sphinxbase/src'
Makefile:479: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

有人能提出解决错误的方案吗。

根据他们在的示例Android项目,他们为Android预先构建的pocketsphinx库(即ARM)与sphinxbase链接在一起,但不包括与访问音频设备相关的方法,即
ad\u open
ad\u start\u rec
ad\u read
。换句话说,他们的预构建库需要在您选择的音频库的帮助下手动向pocketsphinx提供音频样本。 查看用于创建此“组合”版本库的源文件,网址为:

在构建sphinxbase时,脚本试图检测可用的音频库:您应该尝试强制它为“无”,希望它仍能编译