Hello World, it’s Ritesh! And Today We are going to convert an AUDIO File into Text as in the last program Speech2Text.py, we had converted our live Speech into Text, So in this video, we are going to convert an audio file into text! So, let’s start and right jump into it! so for this purpose You’ll need the last program which is available on… GitHub. I’ll be providing a link in the… description. So, check that So, huh for following that, we will need an Audio File… in WAV Format, in .wav format… or in FLAC Format. So, huh AUDIO: ‘Hello dear, we are going to convert an Audio File into… Text’… I don’t know why but this is so So this was the… Audio File So, Open the ‘Speech2Text.py’ program AND Instead of sr.Microphone, we will be… …using – with sr.AudioFile() with sr.AudioFile() for converting the audio file into text! AudioFile(), and here will be… …the name of the Audio FIle, let’s say audio and we have not defined audio yet, so we will define it here like audio… …audio equals what was the name of the file, we just created? It was audio… audio.wav OK! audio equals ‘audio.wav’ Now, as Source, instead of r.listen() as source, we are going to say r… r.record() from the Source. It means, it will record …that audio file And, it’ll send it to the sr… …sr.AudioFile(), for converting… …the speech to text. Not Speech but the Recorded Speech, means the Audio File So, after that, we have just said, try : print (text) text equals r.recognize_google and this is the audio And Except any Exception as e, print the the exception (e). So, let’s run the program and see what happens OK, Save that! Hello Dear we are going to convert an audio file into text it is what we said in the Audio File. So, guys in this way… …you can convert any audio file into text. Notice one thing that …If you will give larger audio… … files, then it will (huh) not work It will give us a Bad GateWay Exception, because it will take some smaller parts of the file like packets… …of the audio file And then, convert it into text. So… Notice one thing to give it a smaller audio file. So, guys Thanks for watching this video, And don’t forget to SUBSCRIBE. Bye Bye and ahve a nice day!