Python how do they add those subtitle overlays on shorts ?

I see it can be done using 3 ways

first, you can extract the audio and transcript it then push that transcript into the video as subtitles but I think 50% of the results won't be accurate

the second way you can use an API for an existing AI model

or you train your model but I don't see it necessary to train your model

if I was in your situation I will use the second way
 
I see it can be done using 3 ways

first, you can extract the audio and transcript it then push that transcript into the video as subtitles but I think 50% of the results won't be accurate

the second way you can use an API for an existing AI model

or you train your model but I don't see it necessary to train your model

if I was in your situation I will use the second way
Just use whisper. No api, runs locally, and you can find pre trained versions easily that make it way more accurate.
 
Google offers speech to text API, that would transcribe your videos for free. I know that many people use this kind of tool for transcribing, because often youtube shorts have typos or some missing/wrong words inside. If you want to automate 100% of adding subtitles then you need to automate speech to text as well.
 
U could use whisper ai to get ur subtitles transcript (srt file) then run a bash script to add the subtitles to the video with ffmpeg. Thats how i am doing it at the moment. This all can be automated with python ( also how i am doing it at the moment )
 
Back
Top