2011-02-02 4 views
7

अरे मैं अजगर में एक कोड है जो मैं क्या micrphone के माध्यम से बात को पहचानने और वाक् में रूपांतरित कर देगा का निर्माण करने के लिए देख रहा हूँ, तुम मुझे कुछ effcient भाषण प्रसंस्करण पुस्तकालयों प्राप्त करने के लिए दे सकते हैं वही??भाषण भाषण के लिए अजगर में प्रसंस्करण पुस्तकालय

उत्तर

0

ड्रैगनफ्लाई नमूना कोड एक टुकड़ा चूक जाता है, जबकि 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. 

में कोड उदाहरण प्रदान

import time 
import pythoncom 
while True: 
    pythoncom.PumpWaitingMessages() 
    time.sleep(.1) 

द्वारा पालन किया जाना चाहिए यहाँ उल्लेख किया को देखने के लिए चाहते हो सकता है - http://dragonfly.googlecode.com/svn-history/r46/trunk/dragonfly/examples/dragonfly-main.py