简体   繁体   English

在 Mac OS X 中设置 PocketSphinx

[英]Setting Up PocketSphinx in Mac OS X

I am running Enthought Python 2.7 as well as default Python 2.7 , Xcode 4.5.1 in Mac OS 10.8.2 .我在Mac OS 10.8.2运行Enthought Python 2.7以及默认的Python 2.7Xcode 4.5.1 I am trying to develop a speech to text converter in Python .我正在尝试用Python开发语音到文本转换器。 I use Enthought Python as it allows me to record in 16000Hz, 1 Channel using pyaudio , which is needed for pocketsphinx to work.我使用Enthought Python因为它允许我使用Enthought Python16000Hz, 1 Channel进行pyaudio ,这是pocketsphinx工作所需的。

I am trying to setup pocketsphinx using brew install pocketsphinx .我试图建立pocketsphinx使用brew install pocketsphinx

I get the following errors我收到以下错误在此处输入图片说明

Even manual installation using make and using default python results in same errors即使使用make和使用默认python手动安装也会导致相同的错误在此处输入图片说明

Using brew doctor, I get使用 brew doctor,我得到在此处输入图片说明

How do I successfully install pocketsphinx ?如何成功安装pocketsphinx

Here is my config.log这是我的config.log

Homebrew logs pocketsphinx , sphinxbase自制日志pocketsphinx , sphinxbase

Bash_Profile

According to the log you have outdated version of the libsndfile installed.根据日志,您安装的 libsndfile 版本已过时。 You have a header sndfile.h, but not sndfile.pc pkg-config file:您有一个标头 sndfile.h,但没有 sndfile.pc pkg-config 文件:

configure:14532: checking for SNDFILE
configure:14540: $PKG_CONFIG --exists --print-errors "sndfile"
Package sndfile was not found in the pkg-config search path.
Perhaps you should add the directory containing `sndfile.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sndfile' found
configure:14543: $? = 1
configure:14558: $PKG_CONFIG --exists --print-errors "sndfile"
Package sndfile was not found in the pkg-config search path.
Perhaps you should add the directory containing `sndfile.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sndfile' found
configure:14561: $? = 1
No package 'sndfile' found
configure:14589: result: no
configure:14603: checking sndfile.h usability
configure:14603: gcc -std=gnu99 -c -g -O2 -Wall  -
I/Library/Frameworks/Python.framework/Versions/7.3/include/python2.7 -
I/Library/Frameworks/Python.framework/Versions/7.3/include/python2.7 conftest.c >&5
configure:14603: $? = 0
configure:14603: result: yes

To solve this problem either remove the header to not confuse the configure or install newer sndfile with pkg-config support.要解决此问题,请删除标头以免混淆配置或安装具有 pkg​​-config 支持的新 sndfile。

Actually that should be fixed in sphinxbase as well, a bug report would be welcome.实际上,这也应该在 sphinxbase 中修复,欢迎提交错误报告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM