Video thumbnail for Tutorial - How to Generate Youtube SRT Subtitle Using WhisperX AI

AI Subtitles: Generate YouTube SRT Files with WhisperX (Free Tutorial)

Summary

Quick Abstract

Want to easily add subtitles to your YouTube videos? This summary reveals how to generate YouTube SRT files using AI with WhisperX. Discover a simple, step-by-step tutorial using Google Colab, from accessing the script to uploading the final SRT file to your YouTube video. Learn how to adapt the script for different languages and even auto-translate into multiple languages!

Quick Takeaways:

  • Use a provided GitHub script within Google Colab to automate SRT generation.

  • Easily modify the script to match your video's language for accurate transcription.

  • The script downloads the video's audio, converts it to text, and creates an SRT file.

  • Download the generated SRT file directly from Colab with a simple click.

  • Effortlessly upload the SRT file to your YouTube video's subtitle settings.

  • Utilize YouTube's auto-translate feature to create subtitles in multiple languages after uploading the initial SRT.

This article explains how to generate YouTube SRT subtitle files using AI, specifically WhisperX. The process is straightforward and can be done using Google Colab.

Accessing the Required Resources

To begin, navigate to the provided GitHub link (found in the YouTube description of the video). From there, click the "Open in Colab" link to open the notebook in a new tab.

Preparing the Colab Notebook

Inputting Your YouTube Video URL

Locate the YouTube video for which you want to create subtitles. Copy the video's link address. In the Colab notebook, find the section where you need to specify the video URL and paste the copied link.

Setting the Language

Adjust the language setting in the Colab notebook to match the language spoken in your YouTube video. For English videos, set it to "EN." For Indonesian videos, as demonstrated in the transcript, set it to "ID."

Running the Colab Notebook

Once the URL and language are set, click "Runtime" and then "Run All." Confirm by clicking "Run Anyway." The program will then begin its process automatically.

The Subtitle Generation Process

  1. Downloading the MP3: The program first downloads the audio from your YouTube video in MP3 format.
  2. Transcribing with AI: It then uses the WhisperX AI model to transcribe the audio and generate the subtitle (SRT) file.
  3. Downloading the SRT File: Once complete, the SRT file (named "audio.srt") will be available for download.

Downloading and Reviewing the SRT File

After the program finishes, an "audio.srt" file will be generated. Double-click the file to review the generated subtitles. To download the file, click the three dots next to the filename and select "Download."

Uploading the SRT File to YouTube

  1. Edit Your Video: Go to your YouTube Studio and edit the video for which you generated the subtitles.
  2. Navigate to Subtitles: In the video editor, go to the "Subtitles" section.
  3. Add Language: Add the language of the subtitle (e.g., Indonesian).
  4. Upload File: Click "Add Subtitle" and choose "Upload file." Select the SRT file you downloaded from Google Colab.
  5. Publish: Once the subtitles are uploaded and synced, publish the changes to your video.

Adding Subtitles in Other Languages (Auto-Translation)

You can also add subtitles in other languages. For example, to add English subtitles to an Indonesian video:

  1. Add Language: Add English as a language in the "Subtitles" section.
  2. Auto-Translate: Select the "Auto-translate" option. This will translate the existing Indonesian subtitles into English.
  3. Review and Publish: Review the auto-translated subtitles and publish the changes.

Processing Time

The time it takes to generate the subtitles depends on the length of your video. In the example provided, a 5-minute video took approximately 4 minutes to generate the SRT file. This includes the time to download the mp3, download the AI model and to translate the audio.

Was this summary helpful?

Quick Actions

Watch on YouTube

Related Summaries

No related summaries found.

Stay Updated

Get the latest summaries delivered to your inbox weekly.