Skip to content

Amalajith1/speachrecognation-syntaxi-in-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

speachrecognation-syntaxi-in-python

def takeCommand(): #it takes microphone input from the user and return string output

r = sr.Recognizer()
with sr.Microphone() as source:
    print("listening...")
    r.energy_threshold = 50 #to slow down the speed of our command    
    r.pause_threshold = 1
    audio = r.listen(source)

try:
    print("Recognizing....") '''to print '''
    query = r.recognize_google(audio, language='en-in')
    print(f"User said: {query}\n")  
except Exception as e:
    #print(e)

    speak("say that again please") '''exceptional case'''
    return "none"        
return query

The

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors