Hey I am looking to create code in python that recognizes what I am talking through a microphone and converts to speech, can you please give me some effective speech processing libraries to achieve the same?
See pyspeech (python) - Transcribe mp3 files?
which talks about http://code.google.com/p/pyspeech/ . You can also see http://code.google.com/p/dragonfly/
Dragonfly Sample Code skips a piece of code, providing sample code 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
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