在Mac OS X中设置PocketSphinx

时间:2012-11-08 05:37:51

标签: python macos speech-to-text cmusphinx

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

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

我收到以下错误enter image description here

即使使用make进行手动安装并使用默认python也会导致相同的错误 enter image description here

使用brew医生,我得到enter image description here

如何成功安装pocketsphinx

这是我的config.log

自制日志pocketsphinxsphinxbase

Bash_Profile

1 个答案:

答案 0 :(得分:1)

根据日志,你已经安装了libsndfile的过时版本。你有一个标题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

要解决此问题,请删除标头,以免混淆配置或安装较新的sndfile与pkg-config支持。

实际上也应该在sphinxbase中修复,欢迎使用错误报告。