【发布时间】:2019-07-12 20:53:21
【问题描述】:
我对 python 语音识别问题和音频库有疑问
这是在windows系统上
import speach_recognition as sr
r =sr.Recognizer()
with sr.Microphone() as source:
print("Speak Anything")
audio = r.listen(source)
try:
text = r.recognize_google(audio)
print('you said : {}'.format(text))
except:
print('sorry could not recognized voice')
C:\Users\DELL> pip install audio 收集音频 使用缓存 https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz 收集包的构建轮:音频构建轮 pyaudio (setup.py) ...错误错误:命令的完整输出 'C:\ProgramData\Anaconda3\python.exe' -u -c '导入安装工具, tokenize;file='"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-1gm3suw5\pyaudio\setup.py'"'"``';f= getattr(标记化, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\DELL\AppData\Local\Temp\pip-wheel-ke5zzs2d' --python-tag cp37: 错误: 运行 bdist_wheel 运行构建运行 build_py 创建构建创建构建\lib.win-amd64-3.7
复制 src\pyaudio.py -> build\lib.win-amd64-3.7 运行 build_ext 构建“_portaudio”扩展错误:Microsoft Visual C++ 14.0 是 必需的。使用“Microsoft Visual C++ Build Tools”获取它: https://visualstudio.microsoft.com/downloads/
---------------------------------------- 错误:pyaudio 运行设置的构建轮失败。 pyaudio 的 py clean 构建失败 pyaudio 安装收集的包: pyaudio 运行 setup.py 安装音频...错误 错误:命令 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import setuptools 的完整输出, tokenize;file='"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-1gm3suw5\pyaudio\setup.py'"'"';f=getattr(标记化, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' 安装--记录 'C:\Users\DELL\AppData\Local\Temp\pip-record-e6fzeo61\install-record.txt' --single-version-externally-managed --compile: 错误:运行安装 运行构建 运行 build_py 创建构建 创建 build\lib.win-amd64-3.7 复制 src\pyaudio.py -> build\lib.win-amd64-3.7 运行 build_ext 构建“_portaudio”扩展 错误:需要 Microsoft Visual C++ 14.0。使用“Microsoft Visual C++ Build Tools”获取它: https://visualstudio.microsoft.com/downloads/ ---------------------------------------- 错误:命令“'C:\ProgramData\ Anaconda3\python.exe' -u -c '导入设置工具, tokenize;file='"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-1gm3suw5\pyaudio\setup.py'"'"';f=getattr(标记化, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' 安装--记录 'C:\Users\DELL\AppData\Local\Temp\pip-record-e6fzeo61\install-record.txt' --single-version-externally-managed --compile" 失败,错误代码 1 在 C:\Users\DELL\AppData\Local\Temp\pip-install-1gm3suw5\pyaudio\
【问题讨论】:
标签: python-3.x speech-recognition speech-to-text