Python 中的语音识别 [英] Voice Recognition in Python

查看:32
本文介绍了Python 中的语音识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 Python 3.3 开发一个虚拟助手程序,我想在其中加入语音识别功能.有谁知道任何 python 模块或工具来做到这一点?任何帮助将不胜感激!

I'm currently working on a virtual assistant program in Python 3.3, and I'd like to incorporate voice recognition in it. Does anyone know of any python modules or tools to do this with? Any help would be greatly appreciated!

推荐答案

我在这个主题上花了很多时间.

I've spent a lot of time working on this subject.

目前我正在开发一个名为 Athena Voice:https://github.com/athena-voice/athena-voice-client

Currently I'm developing a Python 3 open-source cross-platform virtual assistant program called Athena Voice: https://github.com/athena-voice/athena-voice-client

用户可以像使用 Siri、Cortana 或 Amazon Echo 一样使用它.

Users can use it much like Siri, Cortana, or Amazon Echo.

它还使用了一个非常简单的模块"系统,用户可以在其中轻松编写自己的模块来增强其功能.让我知道这是否有用.

It also uses a very simple "module" system where users can easily write their own modules to enhance it's functionality. Let me know if that could be of use.

否则,我建议您查看 Google 的 Python 语音转文本和文本转语音包.

Otherwise, I recommend looking into Google's Python speech-to-text and text-to-speech packages.

这两个包都可以使用以下命令安装:

Both packages can be installed by using the command:

pip install SpeechRecognition gTTS

谷歌 STT:https://pypi.python.org/pypi/SpeechRecognition/

谷歌 TTS:https://pypi.python.org/pypi/gTTS/1.0.2

我相信 STT 有 PyAudio 作为依赖项,可以在这里找到(非官方):http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

I believe the STT has PyAudio as a dependency which can be found here (unofficial): http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

但是,如果您打算进行被动/离线收听,我强烈建议您重新考虑pocketsphinx.在 Python 3.4 上,只需输入pip install pocketsphinx"即可安装

However, if you intend to do passive/offline listening, I highly recommend reconsidering pocketsphinx. On Python 3.4 it can be installed just by typing "pip install pocketsphinx"

这篇关于Python 中的语音识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆