TubeInsight is a Python-based tool that extracts YouTube video transcripts, summarizes them using gemini-2.5-flash, and allows interactive Q&A about the content. It also integrates OpenAI Whisper for audio transcription if captions are unavailable.
- Fetch YouTube video transcripts automatically. reveresed engined - https://youtubetotranscript.com/transcript
- Fallback to Whisper for audio transcription if subtitles are missing.
- Summarize transcripts concisely using gemini-2.5-flash.
- Ask questions interactively about the video content, with AI-powered streaming responses.
- Colorful, user-friendly terminal interface using Rich.
- Clone the repository:
git clone https://github.com/krishcodes07/TubeInsight.git
cd TubeInsight- Install dependencies:
pip install -r requirements.txt- Create a
.envfile in the project root with your Gemini API key:
GEMINI_API_KEY=your_api_key_hereRun the main application:
python app.py- Enter the YouTube URL when prompted.
- The transcript will be fetched. If unavailable, audio will be downloaded and transcribed using Whisper.
- A summary of the video will be displayed.
- Ask questions about the video interactively in the terminal.
- Type
exitorquitto stop.
TubeInsight/
│
├─ app.py # Main script
├─ .env # Environment variables (API keys)
├─ requirements.txt # Python dependencies
├─ data/ # Transcripts saved here
├─ utils/
│ └─ logger.py # Rich logging setup
├─ services/
│ ├─ youtube.py # YouTube audio downloader
│ ├─ transcript.py # Transcript fetching & Whisper transcription
│ └─ gemini.py # Gemini AI summarization & Q&A
└─ README.md
- Rich – For colorful terminal output
- Whisper – Audio transcription
- pytubefix – YouTube video download
- Requests – HTTP requests
- BeautifulSoup4 – HTML parsing
- Google Generative AI – Gemini AI interaction
- Make sure you have a stable internet connection for transcript fetching and Gemini API calls.
- Audio transcription may take longer depending on video length.
- Transcript files are saved in the
data/folder for reuse.
MIT License © 2025 Developed by Krish