gpt4 book ai didi

python-3.x - python 3.x 中的语音识别

转载 作者:行者123 更新时间:2023-12-04 00:38:49 24 4
gpt4 key购买 nike

我搜索了大约 3 天的时间来寻找图书馆或通过 python 3 进行语音识别的东西..我发现所有图书馆都过时了,他们有什么办法吗? , 我在 Windows 8 上工作

最佳答案

如果您仍然需要它或者其他人会遇到这个问题,我最近发现了这个:https://pypi.python.org/pypi/SpeechRecognition/

它使用 Google 语音识别 API。

在我的 MacBook OS X 10.8.5/Python 3.4 上测试过 - 在处理来自麦克风的输入时工作正常,支持不同的语言。

请记住,对于某些任务,它可能需要您安装额外的模块,这里引用其要求:

The first software requirement is Python 3.3 or better. This is required to use the library.

Additionally, it must be 32-bit Python if you are using the included PyAudio binaries. It is also technically possible though inconvenient to compile PyAudio for 64-bit Python.

If you want to use the Microphone class (necessary for recording from microphone input), PyAudio is also necessary. If not installed, the library will still work, but Microphone will be undefined.

The official PyAudio builds seem to be broken on Windows. As a result, in the installers folder you will find unofficial builds for Windows that actually work. Run installers/PyAudio-0.2.7.win32-py3.3.exe for Python 3.3 and PyAudio-0.2.7.win32-py3.4.exe for Python 3.4.

A FLAC encoder is required to encode the audio data to send to the API. If using Windows or Linux, the encoder is already bundled with this library. Otherwise, ensure that you have the flac command line tool, which is often available through one's system package manager.

关于python-3.x - python 3.x 中的语音识别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21843924/

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