Python Speech Recognition
pip install SpeechRecognition through CMD
then open Python IDE and RUN :
Source-Code :
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source :
print("Say Anything :")
audio = r.listen(source)
try:
text = r.recognize_google(audio)
print('You Said : {} '.format(text))
except:
print("Sorry! Could recognize your voice")
: )
then open Python IDE and RUN :
Source-Code :
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source :
print("Say Anything :")
audio = r.listen(source)
try:
text = r.recognize_google(audio)
print('You Said : {} '.format(text))
except:
print("Sorry! Could recognize your voice")
: )
Python Speech Recognition
Reviewed by Coding Guy
on
November 22, 2019
Rating:
No comments: