speech recognition modulehas not working audio r listen source function how to make it work

0 votes
def command1():
    
    r=sr.Recognizer()
    with sr.Microphone() as source:
        print(random.choice(m))
        r.puase_thresshold=1
        sound=r.listen(source)
    try:
        com =r.recognize_google(sound,language='en-in')
        print('user:'+ com +'\n')
    except sr.UnknownValueError:
        speak('try again! by typing sir!')
        com =input('command:')
    return com
Apr 7, 2021 in Python by python

edited Mar 4, 2025 356 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP