【发布时间】:2018-07-31 10:39:21
【问题描述】:
我正在尝试让 Pocketsphinx 在基于 ARM 的处理器上工作以进行热词检测。所以我在 Ubuntu PC 上为 ARM 交叉编译 Sphinxbase 和 Pocketsphinx。我能够在 64 位 Ubuntu PC 上安装 Sphinxbase 和 Pocketsphinx 并使用以下命令使热词检测正常工作:
$./pocketsphinx_continuous -inmic yes -keyphrase “day” -kws_threshold 20
但我在交叉编译 Sphinxbase 时收到错误日志。我首先使用以下命令交叉编译 Sphinxbase。
$./autogen.sh
$./configure --host=arm-linux-gnueabihf --build=x86_64-linux-gnu --prefix=/home/rakesh/sphinx --without-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
有人可以提出解决错误的解决方案吗?
【问题讨论】:
标签: arm cross-compiling voice-recognition cmusphinx pocketsphinx