Skip to content

Aagnya-Mistry/SmartNotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartNotes

Transform YouTube videos into comprehensive study notes with AI-powered summarization and intelligent transcription.

Overview

SmartNotes is a Streamlit-based application that automatically converts YouTube video content into detailed, structured study notes. It intelligently extracts transcripts (with automatic fallback to GPU-powered Whisper), leverages Google Gemini AI to generate educational notes, and stores everything in the cloud for easy access.

Perfect for: Students, educators, and lifelong learners who want to quickly capture and organize learning from video content.

Features

  • Smart Transcript Extraction

    • Automatically fetches YouTube captions when available
    • Falls back to Groq Whisper (GPU-powered) for audio transcription
    • Supports videos without subtitles
  • AI-Powered Study Notes

    • Uses Google Gemini 2.5 Pro to generate detailed notes
    • Structured format with headings, explanations, diagrams, and examples
    • Beginner-friendly explanations for complex topics
  • Cloud Storage

    • All notes stored in Supabase (PostgreSQL)
    • Audio files securely stored in Supabase Storage
    • Access your notes anytime, anywhere
  • Session History

    • Top 10 latest sessions displayed in sidebar
    • One-click access to previous notes
    • ChatGPT-like chat history interface
  • Export Options

    • Download notes as PDF
    • Clean, formatted output ready for printing or sharing

Tech Stack

Component Technology
Frontend Streamlit
Database Supabase (PostgreSQL)
Storage Supabase Storage
AI Models Google Gemini 2.5 Pro, Groq Whisper
APIs YouTube Transcript API, yt-dlp
PDF Generation ReportLab
Language Python 3.9+

Prerequisites

  • Python 3.9 or higher
  • FFmpeg (for audio processing)
  • API Keys for:
    • Google Generative AI (Gemini)
    • Groq (Whisper transcription)
    • Supabase (database & storage)

Quick Start

1. Clone & Setup

git clone https://github.com/Aagnya-Mistry/yt_notes_summarizer.git
cd yt_notes_summarizer

# Create virtual environment
python -m venv venv
.\venv\Scripts\activate  # Windows
# or
source venv/bin/activate  # macOS/Linux

2. Install Dependencies

pip install -r requirements.txt

3. Configure Supabase

Create Supabase Project:

  1. Sign up at supabase.com
  2. Create a new project
  3. Go to SQL Editor and run:
CREATE TABLE video_sessions (
  id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,
  yt_video_name TEXT NOT NULL,
  yt_video_link TEXT NOT NULL,
  yt_video_thumbnail TEXT,
  extracted_insights TEXT NOT NULL,
  audio_file_path TEXT,
  created_at TIMESTAMP DEFAULT NOW()
);

CREATE INDEX idx_created_at ON video_sessions(created_at DESC);

Setup Storage:

  1. Go to Storage in Supabase
  2. Create a new bucket named audio_files
  3. Set visibility to Private

4. Set Environment Variables

Create a .env file in the project root:

GOOGLE_API_KEY=your_google_api_key_here
GROQ_API_KEY=your_groq_api_key_here
SUPABASE_URL=your_supabase_url_here
SUPABASE_KEY=your_supabase_anon_key_here

Get Your API Keys:

Google Gemini API:

Groq API:

Supabase:

  • Go to Project Settings → API
  • Copy Project URL and Anon Key

5. Run the Application

streamlit run app.py

The app will be available at http://localhost:8501

How to Use

  1. Enter YouTube URL

    • Paste any YouTube video link in the text input
  2. Generate Notes

    • Click "Generate Study Notes"
    • The app will automatically:
      • Extract transcript (or transcribe audio)
      • Generate AI-powered study notes
      • Save to cloud database
  3. View Previous Sessions

    • Check the sidebar for your last 10 sessions
    • Click any session to view/download notes
  4. Download as PDF

    • Click "Download Notes as PDF" to save locally

Project Structure

yt_notes_summarizer/
├── app.py                 # Main Streamlit application
├── database.py            # Supabase database functions
├── requirements.txt       # Python dependencies
├── .env                   # Environment variables (ignored in git)
├── README.md             # This file
└── venv/                 # Virtual environment

Features Explained

Transcript Extraction

  • Primary: YouTube Transcript API (fast, if captions exist)
  • Fallback: Groq Whisper-large-v3 (GPU-accelerated, high accuracy)

Note Generation

Uses Google Gemini to create:

  • Clear structured sections
  • Step-by-step explanations
  • ASCII diagrams for concepts
  • Real-life examples
  • Key summary points

Data Storage

  • Metadata: Stored in Supabase PostgreSQL
  • Audio: Stored in Supabase Storage buckets
  • Notes: Stored as extracted_insights in database

Troubleshooting

"supabase_url is required"

  • Ensure .env file exists with SUPABASE_URL and SUPABASE_KEY
  • Check that values don't have extra quotes

Groq API Error (403)

  • Verify your GROQ_API_KEY is valid
  • Check Groq console for rate limits
  • Restart the app after updating the key

FFmpeg Not Found

  • Download FFmpeg from ffmpeg.org
  • Update path in download_audio() function if needed

Database Connection Failed

  • Verify Supabase project is active
  • Check internet connection
  • Ensure table video_sessions exists

Future Enhancements

  • User authentication & personalization
  • Multiple language support
  • Custom note templates
  • Real-time collaboration
  • Mobile app version
  • Browser extension for quick notes
  • Integration with popular note-taking apps
  • Advanced search & filtering
  • Spaced repetition study features
  • Audio playback from stored files

Contributing

Contributions are welcome! Feel free to submit issues and pull requests.

Author

Aagnya Mistry

Acknowledgments


Made for students and learners everywhere

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages