Ticker

6/recent/ticker-posts

Speech To Text Converter- Python Program

 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")

Post a Comment

0 Comments