In this step-by-step tutorial, learn how to use OpenAI’s Whisper AI to transcribe and convert speech or audio into text. Whisper AI performs extremely well and better than most human transcribers. It also outperforms most other speech to text tools in most environments.
Get 99% accurate transcripts, captions and subtitles with Rev — the #1 speech-to-text service in the world. (Disclosure: Signing up through this link gives me a small commission to support videos on this channel. The price to you is the same.)
– Whisper GitHub page:
– Google Drive:
– Install Whisper AI:
!pip install git+https://github.com/openai/whisper.git
!sudo apt update && sudo apt install ffmpeg
– Run Whisper AI:
!whisper “ENTER FILE NAME HERE” –model medium.en
– Additional arguments:
0:34 Whisper AI background
1:20 Install Google Colaboratory
2:10 Configure Google Colaboratory
3:09 Install Whisper AI
3:54 Upload audio or video
4:22 Run Whisper AI
6:06 Review results
6:31 Transcribe another file
6:42 Additional parameters
7:35 Wrap up
📺 RELATED VIDEOS
– Playlist with all my videos on AI:
– Get the latest high-quality tutorial and tips and tricks videos emailed to your inbox each week:
🔽 CONNECT WITH ME
– Official web site:
🎒 MY COURSES
– Go from Excel novice to data analysis ninja in just 2 hours:
🙏 REQUEST VIDEOS
🔔 SUBSCRIBE ON YOUTUBE
🙌 SUPPORT THE CHANNEL
– Hit the THANKS button in any video!
– Amazon affiliate link: (Purchasing through this link gives me a small commission to support videos on this channel — the price to you is the same)
#stratvert #WhisperAI #OpenAI
Hi everyone. Kevin here. Today, we're going to look at how you can take speech And turn it into text using AI. And the really crazy thing is that it does a better Job than most humans. You can use it with English and 96 other languages. It works even if you have a lot of background noise. And it also works if you have a very thick accent. The best part is that it's completely free and also Open source. Let's check out how to do this. We're going to use an AI tool called Whisper. Whisper is made by a company called OpenAI. And you might have heard of them before. That's the same company behind the immensely popular ChatGPT, Which allows you to converse with a computer. They're also the company behind Dalle2, Where you can type in some text, And then it'll generate an image based on that text. You can install Whisper directly on your computer. You can click on the link right up above. But you do need a somewhat capable computer. So instead, we're going to use something Called Google Colaboratory. This allows you to run code directly in your web browser. So it doesn't really matter what type of PC you have. To use Google Colaboratory, head to Google Drive. You can click on the link right up above. You'll need a Google account, And if you don't have one yet, it's entirely free to set up. On Google Drive, in the top left-hand corner, Let's click on the New button. And at the very bottom, let's click on More,
And then go down to Connect More Apps. At the top of this dialog, let's click into the search field, And here, type in Google Colaboratory and then search. Here, we see this result for Colaboratory. Let's click on that, And here, let's click on Install. Next, let's click on Continue. Next, you should see a message saying That Google Colaboratory was connected to Google Drive. Let's click on OK. And look at that. It has successfully been installed. Let's click on Done. Now, you can close out this window. Let's now go back to the top left-hand corner. Click on the New button again. Then go down to More. And here, you should now see an option for Google Colaboratory. Let's click on this one. This drops us into the Google Colaboratory space. And at first glance, it might look a little bit intimidating. But trust me, this is going to be so easy, And the results are going to be so good. In the top left-hand corner, first off, Let's give our file a name. This way, you could find your way back to this in the future. I'll click on Untitled. Let's double-click on that, And here, I'll type in Transcribe Audio. Here, I'll click away, And that's now the name of the file. Next, let's click on the menu titled Runtime, And right here, there's the option For Change Runtime Type.
Let's click on that, And that opens up this dialog where we can choose the hardware Accelerator. Be sure to select GPU or a graphics card. It turns out that graphics cards run these models extremely Well. Next, let's click on Save. Next, we need to install Whisper AI. So let's go up to this field right up above Where we can enter in code. And here, I'll enter this in. You'll find this in the description, So you could simply copy and paste it from there. First, we're going to install Whisper, And we're getting this from GitHub. This is where all of the code is kept and also maintained. Once we get that, we're going to install Something called ffmpeg. And this allows us to work with audio and video files. And although I say we're going to install it, don't worry, We're not installing anything on your computer. This is installing it all to the Google Colaboratory. Once you're all set, over on the left-hand side, Let's click on this Run icon. This will now go through and install Whisper and also Ffmpeg. And it looks like the installation Finished in about 23 seconds. Not too bad. Over on the left-hand side, let's click on this Folder icon. And you can now drag in an audio file or a video file That you would like to transcribe. Here, I have an MP3 file, And I'll simply drop this in.
Here, it says that the uploaded files Will get deleted when this runtime is recycled. That's OK, so let's click on OK. And now we can see that the file has been successfully uploaded. I'm now ready to extract text from this audio file. Let's go back up to the top And here, I'll insert some code. This inserts another field down below, And here, I'll type in Whisper. Here, this is calling the Whisper AI. Then you need to type in the name of the file That you want to extract text from. Mine is called cookies.mp3. So here, I'll make sure it says cookies.mp3. And last, you can also specify the model That you would like to use. I want to use the medium model. You have five different models that you can choose from. On the low end, you have the tiny model. This takes up the least space. It also works the quickest, but you get the worst accuracy. On the other end, you have the large model. It takes up about a gig and a half. It also takes the longest time to process. But you also get the highest quality level. I found that a good sweet spot Is going with the medium model. Once you finish entering this in, Let's click on the Run icon. And check that out. It has now finished running. And right down here, I can see a transcript Of everything that was said in this audio file. Also, over on the left-hand side,
If you don't see these three new files, Right up on top, click on the Refresh icon, And you should see an SRT file, a TXT file, and a VTT file. A text file is just all of the text from the audio. SRT and VTT, these are caption formats That also include timestamps, So you know what was said when. To download any one of these files, Over on the right-hand side, Click on the ellipsis or the three dot, And here you can click on Download. I'll download the SRT file and also the TXT file. Here, I'll click on Download. Here, we can see the TXT file. And the thing I love about using Whisper Is first off, reading through this, It looks like it did a perfect job transcribing. Also, look at all of this, it applied capitalization. You also get punctuation, So this is a very high-quality transcript. When I open up the SRT file, Here you'll see the exact same transcript, But it also includes timestamps for when everything is said. To transcribe another file, You could simply drag another audio or video file in, And then simply update the name right here, And you can run again, And then you'll get another transcript for your next file. To transcribe this file, we just use a very basic command. You also have some additional parameters that you can use. Right up on top, let's add some more code, And right down here, type in whisper -h. You'll also find this in the description, And then let's click on Run.
This opens up all of the available parameters. Here, for instance, You can specify where you want to save the output. Here, you could also specify Whether you want to transcribe a file Or whether you also want to translate a file. Here, you could also specify the language, And you have many other parameters. If you're not sure what a parameter does, If you scroll down a little bit, Here you'll see a detailed explanation Of what every single parameter does. Once you leave Google Colaboratory, Your runtime will end, And it'll automatically remove all of your files. So if you've transcribed some audio, I'd recommend downloading it first before you leave. This is such amazing technology. I personally use it for all of my YouTube video captions. It does a better job than Google's auto-generated captions Because it gets all the words right. It applies capitalization. It takes care of the punctuation. I just have to go in and make a few very minor tweaks And refinements to get it perfect. To watch more videos like this one, Please consider subscribing, And I'll see you in the next video.