What would you say if we told you that using GPT 3 and an AI model, you can turn any YouTube video into a published article on your WordPress blog in a matter of seconds.
No way!
And if we also told you that you can transcribe several videos at the same time.
What do you think?
Well, that’s exactly what we are going to do in this post:
Explain how to use Google Colab, a Python script and an AI model from Open AI, to transcribe YouTube videos and publish content on WordPress automatically.
The image generation, we’ll leave for a future video, so stay tuned to our channel.
Let’s get down to business:
Artificial intelligence automation with Python
OK, you’ve got an idea of what we want to do, but what tools will you need? Just access Google Colab, a free program from Google that allows us to run code from the cloud. In our case, a Python script.
At the moment, it sounds complicated, but nothing could be further from the truth.
I assure you!
Functions of the YouTube and WordPress video transcription script
- Download audio from YouTube video.
- Transcribe the audio into English.
- Delete audio and continue with the download of the next audio.
- Create an entry in our WordPress with the transcription.
- Automatically publish content.
As you can see, all for free, effortlessly and with a great advantage:
It won’t be necessary for the video to have previously created subtitles!
Moreover, if you know how to program, and you dare, it is possible to play with the code to translate the videos into several languages.
And now, once we have awakened the bug to automatically publish YouTube video content on WordPress, you may also be interested in downloading our script on how to publish content on WordPress generated by artificial intelligence to maximize the productivity of your working hours.
But first, let’s take a brief look at the steps before running the script in Google Colab.
Steps before executing the script:
We already have a whole list of YouTube URLs where the videos we would like to transcribe and have content on our blog are uploaded.
That’s not all we’ll need.
To activate our script, you will need an OpenAI API Key that you will need to incorporate in our code as we explain in our video.
You will also need a username and password of the WordPress where we want to publish transcripts and everything ready to press PLAY.
How to run Python code in the browser with Google Colab
Don’t let the title scare you.
If you are not a developer or do not know how to program in Python, we warn you that it is not necessary.
You will be able to follow each of the instructions perfectly without fear of getting lost or making any mistake.
Just follow these steps:
- Make a copy of the Google Colab file in your Drive: Access here to script how to translate videos with AI
- Download dependencies and libraries needed to run Google Colab in your browser by clicking on the first Play button in the sidebar.
- Type in the text box below all the YouTube URLs where the videos you want to transcribe are located. Each of them must be separated by a comma.
- A table will be created automatically. In each of the rows will be stored: URL, video title and text.
- We download the Whisper model to translate the videos.
- We detail the level of transcription quality required.
- Then the audio of the video will be downloaded and transcribed.
- We insert text into the file and proceed to delete audio to free up space and continue iterating with the next video.
- We will give permission to access our WordPress through username and password.
- A transcript of each of the videos will be published automatically in a WordPress post with the title of the video.
This content is generated from the audio voiceover so it may contain errors.
(00:01) Very good welcome and welcome to a new video of iSocialWeb follow with the artificial Intelligence and the automations And in this case go to explain step by step how transcribe videos of YouTube/Youtube of free form and with a very tall quality with this go to achieve that from a video of YouTube/Youtube any one have or do not have subheads generate a text with all what says in the video with a correct punctuation and a quality of translation very tall and all this of form totally free
(00:30) this is a big advantage for example to anterior methods like the download of subheads of a video can use to generate subheads of manual form of a video or even Translate the same and publish our video in other languages for this go to use Google colab as we have used in anterior videos in this video go to go a bit faster if you want a more detailed explanation step by step of how works Python or how use colab can throw an eye to the anterior videos of the canal in these videos of
(00:59) the series can As for example how classify the intention of research of your keywords or how use the artificial Intelligence to write articles are similar contents and in them also use colab and Python, but goes in a bit more to the detail the execution of each line the only that you have to know Is that in collage can use the things by blocs the code executes bloc to bloc This is a bloc and the following bloc would go separated here and to execute it simply have to do click in the
(01:27) left upper corner of each bloc in the button of Play for this go to begin to install the things would have to do click here as you can see all is very commented the text in green and preceded by a pad are commentaries that explain you the things and here would begin to install can see here a line a flechita green in the left part that goes us indicating line what goes executing and once end up that it would have to be anytime this would spend to show the again and would mark us
(01:58) here a check green that it has executed beside the time of execution here would have all the logs of the execution can close them to leave a bit cleaner all and would follow executing cell all the code then here install all the necessary dependencies to continuation import all the bookshops that have installed more some extras that will need and finally will go here to ingresar to the videos of YouTube/Youtube that we want to transcribe for this go to an example one of the videos that
(02:30) we find published could access to him copy the URL and here already indicates it to us, ingrese a list of urls of video of YouTube/Youtube practical eat I go to use only one if it wanted to Add more would put a comma and another video is not necessary So simply I execute the one who need and give to the intro and can see here the green tic has executed correctly now would have a list of videos with all those that have executed separated by commas this is a input manual that have configured like this for the eases and know a bit of
(03:02) programming always can modify it to go up a list of cessation a csv with a list of urls for example or any method of rise of urls that prefer simply need a final list here can see that in this case it is a ready call videolist and that has an item only the video YouTube/Youtube that have selected in the following cell go to generalise all the process of download of video and transcription of the same For this believe two lists one in which we will save the texts and one in which
(03:31) we will save the titles and to continuation will go by all the videos use the bookshop paytuber to download the video download us the model of whisper that is the the model of pney that go to use to transcribe the same here in the part Upper have left you a link to the blog in which they announce the same in case you want to go in more in details, but simply have to know that it is a model coached to transcribe videos transcribe audios to format text is entrelanado in a lot of languages and Works very very
(04:03) well it allows even do translations of the same in this case do not go to do an attribution simply go to work with a translation with a text in Spanish and an audio in Spanish then follow with the code and here can see that we download the model here there is an important point that can modify and is the size of the model Exist several types of models Usually share distinct sizes to facilitate his use in this case go to use the small The small will be able to use the medium or the
(04:32) arts that is to say the average or the big the what goes to do each thing is goes you to allow a main speed of download and processed use models smaller, but went to have a minor quality use models bigger or the involve an upper quality then can here modify it and simply would put the model large here and would download you instead of the small model the Big go to close this and I would leave the small Then download the model download the video to continuation obtain the audio of the
(05:05) video, since the video does not do us fault and would be processing that extra that is occupying us space download us the audio and here begin already go to the model and simply say Hears model transcribes the audio that the audio that have gone down us goes it to us to save dip it in the list of texts translated and erase the audio that have gone down to leave hollow and follow iterating more videos if we were it do not go to execute this cell, since it executed it previously and takes a bit in processing all the audio
(05:36) but you will be able to see here that the result and executes correctly once executed the anterior cell would have the video transcribed in a list and can publish it of automatic form in WordPress this already have seen it in another video that is exactly east of here like automating the creation of contents in WordPress go it to you to review in brief But simply have to have an user in this case have created a call of article chair a password and a URL This is the URL with which Go to
(06:06) publish in accessing to pencil of WordPress of publication we go to use the web of the agency and for the user and the password have to have an user with us work with rights of administrator and Go to have to go to the edition of users and create an application here put him a name to the password of the application put him the same name that to the user for example article Sia of here not to complicate you and will give him Add new password would generate this password that I later
(06:35) I will annul here so that you can not do any and copy it everything here in the URL here modify your command and simply execute the only point here interesting that can modify apart from time of publication is that we go to mark the status like draft do not want that it publish directly, but you can put it directly in publish if like this you wish it execute him once again begins to execute and marks us the green tic 2 seconds as created correctly if we go us to the entrances of social web and update
(07:14) we expect a second to that it upload and will be able to see here Here is can see that have a draft titled like classifying the intention of researches of your keywords in a minute that it is the video of the that spoke and if we access to see it will be able to see that have all the very good content to all today from social web and here have all the perfectly transcribed content and see that it is a tocho is a quite long video are 8 minutes of video and see it that it is perfectly marked Perfectly formateado here have to him give a
(07:56) little to do it a bit beautiful do not publish it like this directly, but is that it works very very well even, keywords, words in English words in Spanish The mixes uses perfectly the perfect relations recognises names of marks and executes them perfectly is a type of transcription much more advanced of which used previously So here you have all the information will leave you the link to this colab in the video and any doubt that have or need are, as leave
(08:28) in the commentaries and can find us in the social nets a greeting
Is it really that simple, or can I get a bug when running the script to translate videos?
Well, sometimes, we’re not going to fool you, it can get a bit tricky and there can be mistakes that make you lose control.
But they are easily fixable.
One of the most common mistakes can happen when you forget a comma when writing the URLs of the videos.
This has happened to us a couple of times during video recording tests.
On the other hand, it can also happen that the artificial intelligence through OpenAI crashes, especially if you are working in American time.
This can cause you to not be able to get the data at the moment, pause the magic with GPT-3 and fail in the process. But don’t worry, this is normal, and you just have to wait a little bit and try again later.
As you can see, many of them can be solved simply by following the steps we mentioned or by taking a closer look at the video.
It is very simple.
Why is it important to transcribe a YouTube video in our blog posts?
Transcribing a YouTube video is important for several reasons.
First, it helps to improve the accessibility of the video for people with hearing disabilities or for those who prefer to read rather than watch videos.
It can also help improve the comprehension of the video content for those who do not speak the language in which the video is spoken.
In addition, transcribing a video may identify important keywords that can be used to optimize the video for search, in the eyes of the user and in the eyes of Google ;-).
How to transcribe a YouTube video?
There are several ways to transcribe a YouTube video.
One way is to use the automatic subtitles generated by YouTube.
However, these captions can be inaccurate and may need to be edited for accuracy. Another way is to transcribe the video manually, which can be a tedious and time-consuming task. There are also online transcription tools that can help transcribe the video automatically.
Here are some of our favorites:
There are plenty of options, however, we can’t leave any chance to at least ask you to try our translation script and compare the time and results obtained.
We’re sure you’ll use it again and again until you get bored.
That’s why we ask you to share it with your friends and acquaintances when you try it.
How can artificial intelligence help with video transcription?
We have just shown you how artificial intelligence can help with video transcription by using speech recognition technology to automatically transcribe the audio from the video.
This certainly saves time and effort compared to manual transcription.
In addition, some automatic transcription tools can also improve transcription accuracy through machine learning and natural language processing.
For now, we just hope you will try our script and if you find it helpful, feel free to share it on social media, leave us a comment or share it with your professional colleagues.
We’d love to hear that we’ve helped you, and will be happy to continue publishing more tips on how to get the most out of AI by automating the most tedious tasks.
References and bibliographical sources
Are you looking for ways to have a greater impact organically with your blog content?