Source Code :
#required module-pip install speechrecognition
import speech_recognition as sr
#intializing recognizer
r = sr.Recognizer()
#give only wav format file
audio_file = sr.AudioFile('channa mereya.wav')
#converting audio file record file
with audio_file as source:
audio_text = r.record(source)
#with google voice we will convert audio to text
print(r.recognize_google(audio_text))
0 Comments