[英]Speech processing library in Python for speech to text
嘿,我正在寻找在python中构建一个代码,它将识别我通过micrphone讲话并转换为语音,你能不能给我几个高效的语音处理库来达到同样的目的?
See pyspeech (python) - Transcribe mp3 files? 请参阅pyspeech(python) - 转录mp3文件?
which talks about http://code.google.com/p/pyspeech/ . 其中涉及http://code.google.com/p/pyspeech/ 。 You may also want to look at http://code.google.com/p/dragonfly/
您可能还想查看http://code.google.com/p/dragonfly/
The dragonfly sample code misses out on a snippet while providing the code example at https://pythonhosted.org/dragonfly/ 蜻蜓示例代码错过了一个片段,同时在https://pythonhosted.org/dragonfly/提供代码示例
from dragonfly.all import Grammar, CompoundRule
# Voice command rule combining spoken form and recognition processing.
class ExampleRule(CompoundRule):
spec = "do something computer" # Spoken form of command.
def _process_recognition(self, node, extras): # Callback when command is spoken.
print "Voice command spoken."
# Create a grammar which contains and loads the command rule.
grammar = Grammar("example grammar") # Create a grammar to contain the command rule.
grammar.add_rule(ExampleRule()) # Add the command rule to the grammar.
grammar.load() # Load the grammar.
should be followed by 应该跟着
import time
import pythoncom
while True:
pythoncom.PumpWaitingMessages()
time.sleep(.1)
as mentioned here - http://dragonfly.googlecode.com/svn-history/r46/trunk/dragonfly/examples/dragonfly-main.py 如上所述 - http://dragonfly.googlecode.com/svn-history/r46/trunk/dragonfly/examples/dragonfly-main.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.