Speech recognition: Tips: 1.Open your terminal or command prompt type "pip install speechRecognition". 2.Check your internet connection. 3.Save a .wav extension recorded audio file name as "sound" in my document. 4.Then, type under below code. Code: import speech_recognition as sr AUDIO_FILE=('sound.wav') r=sr.Recognizer() with sr.AudioFile(AUDIO_FILE) as source: audio=r.record(source) try: print("audio file contain:\n"+r.recognize_google(audio)) except sr.UnknownValueError: print("Not recog") except sr.RequestError: print("Data not get") --------------------------------------------------------------------------------------------------------------------------- Thank you for visiting. Comment for response!
Comments
Post a Comment
Give your feedback!
DO NOT SPAM !!
NO THIRD PARTY PROMOTIONAL LINK !!!! (else comment will be deleted.)