hi i have a code that recognizes my voice and prints it in python shell.
now i want it to print text in the selected text box , what should i do?
code is :
import speech_recognition as sr
def start():
r = sr.Recognizer()
with sr.Microphone() as source:
print("listening started")
audio = r.listen(source)
WIT_AI_KEY = "what ever"
try:
print("Wit.ai thinks you said " + r.recognize_wit(audio, key=WIT_AI_KEY))
except sr.UnknownValueError:
print("Wit.ai could not understand audio")
except sr.RequestError as e:
print("Could not request results from Wit.ai service; {0}".format(e))
start()
start()