HOW TO CONVERT SPEECH TO TEXT USING PYTHON.
PYTHON SPEECH RECOGNITION.
FIRST YOU NEED TO INSTALL A LIBRARY WHICH NAME IS : SpeechRecognition
OPEN CMD/COMMAND PROMPT AND TYPE THIS COMMAND :
pip install SpeechRecognition
Note : You Must Connect To The Internet
AFTER INSTALL THIS LIBRARY OPEN YOU EDITOR AND WRITE THIS CODE:
import speech_recognition as sr
r=sr.Recognizer()
with sr.Microphone() as source:
print("listening......")
audio=r.listen(source)
print("Done")
try:
print("You Said :", r.recognize_google(audio))
except:
print("I din't catch that")
AND RUN YOU GOT THE RESULT.
THIS IS THE WAY YOU CAN CONVERT SPEECH TO TEXT.
WATCH THIS:
PYTHON SPEECH RECOGNITION.
FIRST YOU NEED TO INSTALL A LIBRARY WHICH NAME IS : SpeechRecognition
OPEN CMD/COMMAND PROMPT AND TYPE THIS COMMAND :
pip install SpeechRecognition
Note : You Must Connect To The Internet
AFTER INSTALL THIS LIBRARY OPEN YOU EDITOR AND WRITE THIS CODE:
import speech_recognition as sr
r=sr.Recognizer()
with sr.Microphone() as source:
print("listening......")
audio=r.listen(source)
print("Done")
try:
print("You Said :", r.recognize_google(audio))
except:
print("I din't catch that")
AND RUN YOU GOT THE RESULT.
THIS IS THE WAY YOU CAN CONVERT SPEECH TO TEXT.
WATCH THIS:
Comments
Post a Comment