2012-11-08 101 views
1

我正在运行Enthought Python 2.7以及Mac OS 10.8.2中的默认Python 2.7,Xcode 4.5.1。我试图在Python中开发一个语音转换器。我使用Enthought Python,因为它允许我使用pyaudio16000Hz, 1 Channel中进行记录,这是pocketsphinx工作所需的。在Mac OS X中设置PocketSphinx

我正在尝试使用brew install pocketsphinx设置pocketsphinx

我得到使用make并使用默认python导致同样的错误 enter image description here

使用BREW医生以下错误enter image description here

即使是手动安装,我得到enter image description here

如何成功安装pocketsphinx

这里是我的config.log

家酿日志pocketsphinxsphinxbase

Bash_Profile

+0

构建过程无法找到sndfile库。这可能是由配置阶段的问题引起的。为了理解这些问题,您需要检查由configure创建的文件config.log。您需要共享该文件以使其他人能够解决此问题。 –

+0

@NikolayShmyrev:谢谢你的回复。我上传了我的config.log – VeilEclipse

回答

1

根据安装libsndfile的日志中,您有过时的版本。你有一个标题sndfile.h,但不sndfile.pc pkg配置文件:

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 

为了解决这个问题,要么删除头不要混淆配置或pkg配置支持安装新sndfile。

其实这也应该在sphinxbase中修复,一个错误报告将受到欢迎。

+1

非常感谢您的帮助。我终于可以使用'brew install pocketsphinx'安装'pocketsphinx' – VeilEclipse

+0

这里我得到一个新的错误,http://dl.dropbox.com/u/69889915/Screen%20Shot%202012-11-10%20at%206.37 .41%20 PM.png – VeilEclipse

+0

尝试首先导入sphixnbase,并确保sphinxbase也安装正确。 –