Subscribe Us

Header Ads

How to Convert Audio to Text using python , Python Projects

In this Blog i am gonna tell you how can convert any audio file to Text ....



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


Post a Comment

0 Comments