Skip to main content

YouTube Whisper - A YouTube Downloader with Transcription

Project description

🎥 YTWS: YouTube Download and Subtitle Generation Tool 🔥

YTWS

YTWS is a command-line tool designed to download videos from YouTube and generate subtitles, all with the power of the efficient faster-whisper.

💽 Installation

You can easily install YTWS using the following commands:

git clone https://github.com/faker2048/youtube-whisper
cd youtube-whisper
pip install .

Preparations Before Running

Principle: Simplicity is key, and there should be no side effects.

ffmpeg

If you don't have ffmpeg installed, you can use the standard method to install ffmpeg in your computer's global environment (not detailed here), or you can use conda to install it in your Python virtual environment (recommended):

conda install ffmpeg

GPU Acceleration

Should you need to install the CUDA and cudnn suite, the following methods provide a simple solution:

  • For Linux:
conda install cudnn
  • For Windows:
pip3 install torch --index-url https://download.pytorch.org/whl/cu118

# While utilizing additional torch libraries may not be ideal, it's one of the most 
# straightforward approaches I've discovered for Windows (relative to Nvidia's official CUDA 
# installation). If you're aware of alternative methods or suggestions, your insight would be 
# graciously appreciated!

These steps aim to make the installation process as seamless as possible. Feel free to reach out if you have any questions or concerns!

🪄 Available Model

Visit https://huggingface.co/guillaumekln for more details.

🚀 Quick Start

You can begin downloading YouTube videos and generating subtitles right away. Here's a simple example of how to use YTWS:

# To download videos from YouTube and generate subtitles.
ytws -m large-v2 -u https://www.youtube.com/watch?v=nWvCd8lC4_Q 
# To generate .srt subtitles only. (This will download only the audio and delete it after transcribing)
ytws -m large-v2 -u https://www.youtube.com/watch?v=nWvCd8lC4_Q --srt_only
# Runs on cpu
ytws -u https://www.youtube.com/watch?v=nWvCd8lC4_Q --cpu

Please replace https://www.youtube.com/watch?v=nWvCd8lC4_Q with the URL of the YouTube video you wish to download.

For more customized options like downloading only the video or generating only the subtitles, you can use the --video_only or --srt_only options.

🎛️ Custom Settings

For further details and customization options, please refer to the help information:

ytws --help

🌟 Contributing to ytws

We welcome your support for ytws! Your contributions make a difference.

How to Contribute

  • Fork, Clone, Branch: Start by forking and cloning the repository, then work in separate branches.
  • Commit: Follow the project's standards, and commit your changes.
  • Pull Request: Submit a brief pull request (PR) to the main branch.

Using Pre-Commit

To ensure code format:

pip install pre-commit
pre-commit install

Pre-commit will guide you through necessary checks and adjustments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ytws-0.2.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ytws-0.2.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file ytws-0.2.0.tar.gz.

File metadata

  • Download URL: ytws-0.2.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for ytws-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ddf03966aaa865ac1bb820dbc0a08294c01378d6a217c24dcc217b16fd680e69
MD5 c6fa3deb124245e8469f8ee48c540468
BLAKE2b-256 8b1e240edfb6494981d80ccb6f3c8fc869a05efde842ba36ad4145758f782694

See more details on using hashes here.

File details

Details for the file ytws-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ytws-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for ytws-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1680580620496300d2dc6d03079a4e9b1ef2198ba6ce732bd74a7c976b8f16f0
MD5 23f0fea3ac91d78f82746bde1b80b979
BLAKE2b-256 a501cee23b0e0432dc248ce93b6707d208e4c1bffe7b86e17d0a34d58bc3e568

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page