安装pocketsphinx /libsphinxad/ad_openal.c:43:10: fatal error: ‘al.h’ file not found【解决办法】

今天爱分享给大家带来/libsphinxad/ad_openal.c:43:10: fatal error: ‘al.h’ file not found【解决办法】,希望能够给帮助到大家。
mac上安装pocketsphinx的时候,出现了下面的错误:

....
deps/sphinxbase/src/libsphinxad/ad_openal.c:43:10: fatal error: 'al.h' file not found
    #include 

解决方法
最后查资料发现,mac上需要通过源代码安装:

git clone --recursive https://github.com/bambocher/pocketsphinx-python
cd pocketsphinx-python 

然后修改文件:pocketsphinx-python/deps/sphinxbase/src/libsphinxad/ad_openal.c

把:

#include 
#include 

换成:

#include 
#include 

然后源代码安装:

python setup.py install

全程无报错,安装部分信息为:

.....
creating /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/__init__.py -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/_pocketsphinx.cpython-37m-darwin.so -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx
creating /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/data
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/data/goforward.raw -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/data
creating /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/model/cmudict-en-us.dict -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model
creating /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model/en-us
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/model/en-us/feat.params -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model/en-us
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/model/en-us/mdef -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model/en-us
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/model/en-us/means -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model/en-us
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/model/en-us/noisedict -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model/en-us
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/model/en-us/README -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model/en-us
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/model/en-us/sendump -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model/en-us
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/model/en-us/transition_matrices -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model/en-us
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/model/en-us/variances -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model/en-us
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/model/en-us.lm.bin -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/model
copying build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/pocketsphinx.py -> /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx
creating /Users/admin/anaconda3/lib/python3.7/site-packages/sphinxbase
copying build/lib.macosx-10.7-x86_64-3.7/sphinxbase/__init__.py -> /Users/admin/anaconda3/lib/python3.7/site-packages/sphinxbase
copying build/lib.macosx-10.7-x86_64-3.7/sphinxbase/_ad_openal.cpython-37m-darwin.so -> /Users/admin/anaconda3/lib/python3.7/site-packages/sphinxbase
copying build/lib.macosx-10.7-x86_64-3.7/sphinxbase/_sphinxbase.cpython-37m-darwin.so -> /Users/admin/anaconda3/lib/python3.7/site-packages/sphinxbase
copying build/lib.macosx-10.7-x86_64-3.7/sphinxbase/ad_openal.py -> /Users/admin/anaconda3/lib/python3.7/site-packages/sphinxbase
copying build/lib.macosx-10.7-x86_64-3.7/sphinxbase/sphinxbase.py -> /Users/admin/anaconda3/lib/python3.7/site-packages/sphinxbase
byte-compiling /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/__init__.py to __init__.cpython-37.pyc
byte-compiling /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx/pocketsphinx.py to pocketsphinx.cpython-37.pyc
byte-compiling /Users/admin/anaconda3/lib/python3.7/site-packages/sphinxbase/__init__.py to __init__.cpython-37.pyc
byte-compiling /Users/admin/anaconda3/lib/python3.7/site-packages/sphinxbase/ad_openal.py to ad_openal.cpython-37.pyc
byte-compiling /Users/admin/anaconda3/lib/python3.7/site-packages/sphinxbase/sphinxbase.py to sphinxbase.cpython-37.pyc
running install_egg_info
Copying pocketsphinx.egg-info to /Users/admin/anaconda3/lib/python3.7/site-packages/pocketsphinx-0.1.15-py3.7.egg-info
running install_scripts

人已赞赏
Python

苹果电脑 mac 如何安装ctcdecode【详细步骤】

2020-11-15 9:42:49

Python

python3 使用PyPDF2分割pdf【附代码】

2020-11-15 11:10:03

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
'); })();