Speech processing library in Python for speech to text

嘿,我期待在python中建立一个代码,它会识别我通过micrphone说话并转换为语音,你能给我几个高效的语音处理库,以实现相同的?


See pyspeech (python) - Transcribe mp3 files?

which talks about http://code.google.com/p/pyspeech/. You may also want to look at 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/

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://www.djcxy.com/p/50450.html

上一篇: 结合Facebook喜欢的URL和Facebook页面

下一篇: 用于语音到文本的Python语音处理库