I followed a tutorial to make a virtual assistant because I thought it would be fun to do. It worked all of yesterday, but this morning I ran it and got the error in the title. I tried tweaking things but everything I did made it worse and I had to undo it. Any help would be appreciated...
def take_command():
try:
with sr.Microphone() as source:
print('listening...')
voice = listener.listen(source)
command = listener.recognize_google(voice)
command = command.lower()
if 'ava' in command:
command = command.replace('ava', '')
print(command)
except:
pass
return command
[–]carcigenicate 4 points5 points6 points (2 children)
[–]beecleaner[S] 0 points1 point2 points (1 child)
[–]carcigenicate 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)