Skip to content

a python script that can auto generate subtitle in YouTube Videos

License

Notifications You must be signed in to change notification settings

blusewill/ytvideo-whisper

Repository files navigation

Languages Available:English 繁體中文

ytvideo-whisper

ytvideo-whisper is a Python script for downloading YouTube videos and generating SRT subtitles with ease.

Tested Examples

Features

  • Download YouTube videos and generate SRT subtitles.
  • Easily set up and run on local systems or Google Colab.
  • Support for custom models.
  • Optimized for faster API usage.

Running on Google Colab

  1. Ensure the runtime type is set to GPU: Runtime -> Change Runtime Type
  2. Update the settings in the settings code block.
  3. Click: Runtime -> Run all (CTRL+F9)
  4. Connect to Google Drive.
  5. Generated subtitles (SRT) will appear in:
    Google Drive -> Whisper -> result

Colab Links

  • Global Version
    Open In Colab

  • KMN_BOT Special Version (Chinese Traditional)
    Open In Colab

Installation

Prerequisites

  • Install Python on your system.

Automated Installation (Linux)

  1. Run the setup script to set up a virtual environment and install dependencies:
    ./setup-requirement.sh
  2. Run the main script:
    ./run-script.sh

Manual Installation

  1. Create a Python virtual environment:
    python3 -m venv ./.virtualenv
  2. Activate the virtual environment:
    • Bash/Zsh:
      source ./.virtualenv/bin/activate
    • Csh/Tcsh:
      source ./.virtualenv/bin/activate.csh
    • Fish:
      source ./.virtualenv/bin/activate.fish
    • Powershell:
      • Allow script execution:
        Set-ExecutionPolicy -ExecutionPolicy Bypass
      • Activate the virtual environment:
        .\.virtualenv\Scripts\activate

Todo List

  • Add Windows GPU support.
  • Implement faster API.
  • Support custom models.
  • Add an installation script.

Contributors


Feel free to contribute and make this project even better! 🎉

About

a python script that can auto generate subtitle in YouTube Videos

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published