This is a simple example of how to use OpenAI's Whisper to transcribe a YouTube video and shorts. The code is written in Python and can be run on Google Colab. The notebook will guide you through the process of transcribing a YouTube video or shorts using OpenAI's Whisper.
- Open the Google Colab page.
- Feel free to
Copy to Drive
the notebook or run it directly. - Enter the URL of the YouTube video or shorts you want to transcribe.
- Choose the whisper model you want to use.
- Run the code cell (Step 1-3) and wait for the transcription to complete.
- Whenever you change the YouTube URL or Whisper Model, please run the
Step 1
and then runStep 3
(You can skipStep 2
if you already ran it before) - When you run
Step 3
, the website might ask you a permission to download multiple files. - Here's a list of whisper model and the relative speed of each model. For more information, please visit the official GitHub page: https://github.com/openai/whisper#available-models-and-languages
Size | Parameters | English-only model | Multilingual model | Required VRAM | Relative speed |
---|---|---|---|---|---|
tiny | 39 M | tiny.en |
tiny |
~1 GB | ~32x |
base | 74 M | base.en |
base |
~1 GB | ~16x |
small | 244 M | small.en |
small |
~2 GB | ~6x |
medium | 769 M | medium.en |
medium |
~5 GB | ~2x |
large | 1550 M | N/A | large |
~10 GB | 1x |
This project is licensed under the terms of the MIT license. For more information, please refer to the LICENSE file.
This project is not affiliated with OpenAI. The code provided here is for educational purposes only. Please use it responsibly and respect the terms of service of the platforms you are using.