In this post, we are gonna make a speech to text python program using speech_recognition library in python.
This program is so much fun and does not require any complex programming.
Just install speech recognition from command prompt and have fun.
import speech_recognition as sr r= sr.Recognizer() with sr.Microphone() as source: print("try speaking anything : ") audio = r.listen(source) try: text = r.recognize_google(audio) print("you said : {}".format(text)) except: print("cannot recognize your voice")
0 Comments