SPEECH RECOGNITION USING PYTHON
Getting input from microphone # Getting input from microphone import speech_recognition as sr # Initializing microphone to listen with sr.Microphone() as source: print ( "listening...." ) # Storing the audio source in a variable audio = sr.Recognizer().listen(source) # Converting audio into string data = sr.Recognizer().recognize_google(audio , language = "en-in" ) print (data) Getting input from existing audio file # Getting input from existing audio file import speech_recognition as sr # using exiting audio file as a source with sr.WavFile( "filename.mp3" ) as source: # Storing the audio source in a variable audio = sr.Recognizer().listen(source) # converting audio into string audio_content = sr.Recognizer().recognize_google(audio , language = "en-in" ) print (audio_content) Listening to microphone in background # listening to microphone in background import speech_recognition as sr # Infinite loop while True : try : ...