【问题标题】:Setting Up PocketSphinx in Mac OS X在 Mac OS X 中设置 PocketSphinx
【发布时间】:2012-11-08 05:37:51
【问题描述】:

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

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

我收到以下错误

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

使用brew医生,我得到

如何成功安装pocketsphinx

这是我的config.log

自制日志pocketsphinxsphinxbase

【问题讨论】:

  • 构建过程找不到 sndfile 库。这可能是由于配置阶段的问题。为了理解这些问题,您需要检查由 configure 创建的文件 config.log。您需要共享该文件以使其他人能够解决此问题。
  • @NikolayShmyrev:感谢您的回复。我上传了我的 config.log

标签: python macos speech-to-text cmusphinx


【解决方案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 中修复,欢迎提交错误报告。

【讨论】:

  • 非常感谢您的帮助。我终于能够使用brew install pocketsphinx 安装pocketsphinx
  • 这里我收到一个新错误,dl.dropbox.com/u/69889915/…
  • 先尝试导入sphinxnbase,确保sphinxbase也安装正确。
  • 我正确安装了sphinxbasepocketsphinx。但是上一个链接中的错误是由于之前手动安装 pocketsphinx 导致在构建 sphinxbase 时失败。但是现在在成功brew install pocketsphinx 之后,在我拥有的任何python 版本中,site-packages 中都没有pocketsphinx 库。现在它显示ImportError: No module named pocketsphinx
  • 我为A/D library not implemented FATAL_ERROR: "continuous.c", line 246: Failed to open audio device logout做什么?
猜你喜欢
  • 1970-01-01
  • 2015-05-18
  • 2013-07-27
  • 2015-07-08
  • 2014-05-06
  • 2015-04-28
  • 2011-04-20
  • 1970-01-01
相关资源
最近更新 更多