gpt4 book ai didi

python - 在 Mac OS X 中设置 PocketSphinx

转载 作者:太空宇宙 更新时间:2023-11-03 19:10:05 26 4
gpt4 key购买 nike

我正在运行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 doctor,我得到enter image description here

如何成功安装pocketsphinx

这是我的 config.log

自制日志 pocketsphinx , sphinxbase

Bash_Profile

最佳答案

根据日志,您安装的 libsndfile 版本已过时。您有一个 header 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

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

实际上,sphinxbase 中也应该修复这个问题,欢迎提交错误报告。

关于python - 在 Mac OS X 中设置 PocketSphinx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13283116/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com