Easily transcribe YouTube videos, MP4, and MP3 files to text using Whisper on Google Colab.
- No local setup required β runs entirely on Google Colab
- Supports YouTube URLs, MP4, and MP3 files
- Outputs transcribed text in
.txt
format
- Search for
google colab
on Google and press Enter. - Select the first search result or directly click this link: Google Colaboratory.
- On the Colaboratory page, click the
File
option at the top left. - From the dropdown menu, select
Upload Notebook
. - Drag and drop
Whisper.ipynb
into theOpen a notebook
page. - After uploading, click the
Runtime
option at the top. - From the dropdown, select
Change runtime type
. - In the pop-up window, choose
Python 3
(this should be the default). - Set the hardware accelerator to
T4 GPU
(default is usually CPU). - Click the
Save
button at the bottom left. - Click the
Runtime
menu again. - Select
Run all
(or pressCtrl + F9
) or manually run code blocks 1 through 4 to avoid errors.
Note
Itβs normal to see errors at this point if you decided to Run all
, since no file type or file path has been selected yet.
- Select YouTube from the dropdown menu.
- Click the
Confirm
button. - Run Code Block 5 and paste the YouTube video URL when prompted. Press Enter and wait for the transcription.
- Run Code Block 6 and wait until it outputs
Your Transcript is here: YOUR_FILE_NAME.mp3.txt
. - In the right panel, click
Refresh
if the.txt
file isn't visible. - Right-click on
YOUR_FILE_NAME.mp3.txt
. - Click
Download
to get your text file.
- Select MP4 from the dropdown.
- Click the
Confirm
button. - Drag and drop
<YOUR_FILE_NAME>.mp4
into the Files panel.
Tip
Click the Files icon on the right if the panel isn't open.
- Right-click on the file.
- Select
Copy path
. - Run Code Block 5 and paste the file path into the input prompt. Press Enter to start conversion.
- Run Code Block 6 and wait for the message:
Your Transcript is here: YOUR_FILE_NAME.mp3.txt
. - Click
Refresh
(skip if the TXT file already appears). - Then, right-click on
YOUR_FILE_NAME.mp3.txt
. - Click
Download
to get your text file.
- Select MP3 from the dropdown menu.
- Click the
Confirm
button. - Drag and drop
<YOUR_FILE_NAME>.mp3
into the Files panel.
Tip
Click the Files icon on the right if the panel isn't open.
- Right-click on the file.
- And select
Copy path
. - Run Code Block 5 and paste the file path into the input textbar.
- Run Code Block 6 and wait for the message:
Your Transcript is here: YOUR_FILE_NAME.mp3.txt
. - Click
Refresh
(if needed). - Then, right-click on
YOUR_FILE_NAME.mp3.txt
. - Finally, click
Download
to get your text file.
- Ensure stable internet connectivity for smooth transcription.
- For large files, transcriptions may take longer.
- If you encounter errors, try restarting the runtime (
Runtime
>Restart runtime
).
Happy Transcribing!