Your personal study assistant! This bot makes learning easier by converting YouTube videos into summarized notes with key points. Just send a video link, and get a clear PDF summary—perfect for studying, revising, or quickly understanding any topic. Say goodbye to long videos and hello to smart learning
A demo project to study about ML models and how the models works
- Download YouTube audio with
yt-dlp - Transcribe audio into text using OpenAI Whisper
- Detect spoken language automatically
- Translate Malayalam → English using mBART
- Summarize long transcripts using BART Large CNN
- Extract key points for quick revision
- Generate a PDF report with summary + key points
- Get results directly in Telegram
- Source: OpenAI Whisper
- Task: Speech-to-text transcription and language detection
- Strength: Works with noisy audio and supports multiple languages.
- Source: Hugging Face BART
- Task: Summarization of English text
- Strength: Extracts concise, human-readable summaries from long transcripts.
- Source: Hugging Face mBART
- Task: Translation (Malayalam → English)
- Strength: Supports 50 languages, making the bot multilingual.
-
User sends YouTube link in Telegram
-
Bot downloads audio using
yt-dlp -
Whisper transcribes audio → Returns full transcript
-
Language detection:
- If English → move to summarization
- If Malayalam → Translate Malayalam → English using mBART
-
Summarize transcript with BART-Large-CNN
-
Extract key points (max 8 important sentences)
-
Generate PDF with:
- Title
- Summary
- Key points
- Footer (Bot signature)
-
Bot sends back results:
- Summary in text format
- PDF file with key points
📦 youtube-summarizer-bot
┣ 📜 main.py # Main bot code
┣ 📜 requirements.txt # Dependencies
┣ 📜 README.md # Documentation
git clone https://github.com/harikrishnan669/youtube-summarizer.git
cd youtube-summarizerpython -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windowspip install -r requirements.txtrequirements.txt
python-telegram-bot==20.3
transformers==4.31.0
torch
yt-dlp
openai-whisper
fpdf- Get a bot token from BotFather on Telegram.
- Open
bot.pyand replace:
BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN"python bot.py-
Start the bot in Telegram:
/start -
Send a YouTube link 🎥
-
Bot replies with:
- 📄 A text summary (Telegram message)
- 📑 A PDF report with key points
| Command | Description |
|---|---|
/start |
Start the bot |
/help |
Show available commands |
/steps |
Show bot workflow steps |
/clear |
Clear session (experimental) |
Summary (Telegram Message):
This video explains the basics of AI, its applications in daily life, and future challenges...
PDF Key Points:
- AI is transforming industries
- Applications include healthcare, finance, education
- Challenges include ethics & privacy
- 📊 Better PDF formatting (colors, sections, headings)
- 🌍 Support for more languages
- ☁️ Cloud storage for generated PDFs
- 🎥 Handle very long videos with chunk-based transcript summarization
Pull requests are welcome! Please open an issue first to discuss major changes.
![]() |
![]() |
![]() |
![]() |
MIT License – Feel free to use and modify.




