Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import speech_recognition as sr
def speech_to_text():
r = sr.Recognizer()
with sr.Microphone() as source:
print("enter anything")
audio = r.listen(source)
try:
text = r.recognize(audio)
print("You said {}".format(text))
return text
except:
print("Did not understand that.")
t = speech_to_text()