-1

Hey i need a hand this is my first post on here so i don't know how to do this but i would like to find out how to fix my issue i am new to coding

def get_audio():
    with sr.Microphone() as source:
        audio = listener.listen(source)
        said =''

        try:
            said = r.recognize_google(audio)
            print(said)
        except Exception as e:
            print('Exception' + str(e))
Wake = 'hey friday'
while True:
text = get_audio()
    if text.count(Wake) < 0:
        talk('I am ready sir')
  • 1
    Does this answer your question? [Why do I get AttributeError: 'NoneType' object has no attribute 'something'?](https://stackoverflow.com/questions/8949252/why-do-i-get-attributeerror-nonetype-object-has-no-attribute-something) – Himanshu Pingulkar Jan 02 '22 at 13:00

1 Answers1

-1

Your get_audio function must return something.

text gets nothing from get_audio so it emits AttributeError.