本文介绍了在Mac OS X中设置PocketSphinx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am running Enthought Python 2.7 as well as default Python 2.7, Xcode 4.5.1 in Mac OS 10.8.2. I am trying to develop a speech to text converter in Python. I use Enthought Python as it allows me to record in 16000Hz, 1 Channel using pyaudio, which is needed for pocketsphinx to work.

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

I am trying to setup pocketsphinx using brew install pocketsphinx.

我收到以下错误

即使使用make手动安装并使用默认的python也会导致相同的错误

Even manual installation using make and using default python results in same errors

使用啤酒医生,我会得到

Using brew doctor, I get

如何成功安装pocketsphinx?

这是我的 config.log

自制程序日志 pocketsphinx sphinxbase

推荐答案

根据日志,您已安装的libsndfile版本已过时.您有一个头sndfile.h,但没有sndfile.pc pkg-config文件:

According to the log you have outdated version of the libsndfile installed. You have a header sndfile.h, but not sndfile.pc pkg-config file:

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-config支持的较新sndfile.

To solve this problem either remove the header to not confuse the configure or install newer sndfile with pkg-config support.

实际上,该问题也应该在sphinxbase中修复,欢迎提供错误报告.

Actually that should be fixed in sphinxbase as well, a bug report would be welcome.

这篇关于在Mac OS X中设置PocketSphinx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 23:37