YouTube Whisper - A YouTube Downloader with Transcription
Project description
🎥 YTWS: YouTube Download and Subtitle Generation Tool 🔥
YTWS is a command-line tool designed to download videos from YouTube and generate subtitles, all with the power of the efficient faster-whisper.
Features
- Easy to Use: Get started without hassle.
- Fast Subtitle Generation: Utilize
faster-whisperfor quick results. - GPU Acceleration: Simple guide for GPU utilization.
- Cross-Platform: Works on Windows and Linux.
These features make YTWS an efficient and user-friendly tool for downloading YouTube videos and generating subtitles.
💽 Installation
You can easily install YTWS using the following commands:
pip install ytws
or
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ytws-0.2.1.tar.gz.
File metadata
- Download URL: ytws-0.2.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9393675fe8fa395c6cb870687359e611f771116a61540a434feb598a15da17d
|
|
| MD5 |
4a94cdeaa12aa69774f1d14ae3f3ad38
|
|
| BLAKE2b-256 |
fecd209500f305c143dd85177709a5d134e97d43bb13a2be2c97e03b3cc60df7
|
File details
Details for the file ytws-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ytws-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
068154764d4c2ba0e3524867a1412bbbe4e10e42173981990b6d1cc4fc6c86de
|
|
| MD5 |
e5d36e1cfc10cf127b59b65801f8da85
|
|
| BLAKE2b-256 |
4997eef9bc2dbbe662e447db2af0ad7cac7f332ac7dfc79995c680c1b2d58cae
|