Skip to content

Ayush-AM/YT-Transcripter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ₯ YouTube Video Chat App

Chat with any YouTube video using AI - Extract transcripts and have intelligent conversations

Python Flask Gemini AI License

Demo β€’ Features β€’ Quick Start β€’ Usage β€’ API


πŸš€ Demo

🎬 Paste YouTube URL β†’ πŸ€– AI processes transcript β†’ πŸ’¬ Chat about video content

Example Conversation:

User: "What are the main points discussed in this video?"
AI: "Based on the transcript, the video covers 3 main topics: ..."

User: "Can you explain the concept mentioned at 5:30?"
AI: "At that timestamp, the speaker discusses ..."

✨ Features

Feature Description
πŸŽ₯ Video Processing Extract transcripts from any YouTube video with captions
πŸ€– AI Chat Powered by Google Gemini 1.5 Flash for intelligent responses
πŸ” Smart Search Find relevant video segments with text-based search
⚑ Fast & Simple No complex databases or vector embeddings required
🌐 Web Interface Clean, responsive UI with real-time chat
πŸ†“ Cost Effective No quota limits or embedding costs

πŸƒβ€β™‚οΈ Quick Start

Prerequisites

Installation

  1. Clone & Navigate

    git clone https://github.com/Ayush-AM/Dev.git
    cd 2_youtube_chat_app
  2. Setup Environment

    # Windows
    python -m venv venv
    venv\Scripts\activate
    
    # macOS/Linux
    python3 -m venv venv
    source venv/bin/activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Configure API Key

    # Create .env file
    echo GOOGLE_API_KEY="your_api_key_here" > .env
  5. Launch App

    python application.py
  6. Open Browser

    http://127.0.0.1:5001
    

πŸ“– Usage

Step-by-Step Guide

  1. πŸ“ Enter YouTube URL

    • Paste any YouTube video URL with captions/subtitles
    • Supports: youtube.com/watch?v=... or youtu.be/...
  2. βš™οΈ Process Video

    • Click "Process Video" button
    • Wait for "Video processed successfully!" message
  3. πŸ’¬ Start Chatting

    • Ask questions about video content
    • Get AI-powered responses with context

πŸ’‘ Example Queries

Query Type Example
Summary "What are the key takeaways from this video?"
Specific Topic "Explain the concept mentioned at 10:30"
Analysis "What's the speaker's main argument?"
Details "List all the tools mentioned in the video"

πŸ“ Project Structure

2_youtube_chat_app/
β”œβ”€β”€ πŸ“„ application.py          # Main Flask app (Production Ready)
β”œβ”€β”€ πŸ“„ app.py                 # Advanced RAG version (Future)
β”œβ”€β”€ πŸ“„ agent.py               # Pinecone integration
β”œβ”€β”€ πŸ“„ simple_agent.py        # Lightweight agent
β”œβ”€β”€ πŸ“ templates/
β”‚   └── πŸ“„ index.html         # Web interface
β”œβ”€β”€ πŸ“„ requirements.txt       # Dependencies
β”œβ”€β”€ πŸ“„ requirements_simple.txt # Minimal dependencies
β”œβ”€β”€ πŸ“„ .env                   # Environment variables (ignored)
β”œβ”€β”€ πŸ“„ .gitignore            # Git ignore rules
└── πŸ“„ README.md             # Documentation

πŸ› οΈ Technical Stack

Component Technology Purpose
Frontend HTML/CSS/JavaScript Clean, responsive UI
Backend Flask Lightweight web framework
AI Model Google Gemini 1.5 Flash Natural language processing
Transcript YouTube Transcript API Video text extraction
Search Text-based matching Fast content retrieval
Storage In-memory No database required

πŸ—οΈ Architecture

graph TD
    A[YouTube URL] --> B[Transcript Extraction]
    B --> C[Text Processing]
    C --> D[Gemini AI]
    D --> E[Chat Response]
    E --> F[Web Interface]
Loading

πŸ”§ Troubleshooting

❌ "No transcript available"

Cause: Video doesn't have captions/subtitles

Solutions:

  • βœ… Use videos with auto-generated captions
  • βœ… Try educational/tutorial videos (usually have captions)
  • βœ… Check if captions are enabled on YouTube
πŸ”‘ "API Key Error"

Cause: Invalid or missing Google API key

Solutions:

  • βœ… Verify API key in .env file
  • βœ… Get new key from Google AI Studio
  • βœ… Check API key permissions
  • βœ… Ensure no extra spaces in .env
πŸšͺ "Port already in use"

Cause: Another process using port 5001

Solutions:

  • βœ… Change port: app.run(port=5002) in application.py
  • βœ… Kill existing process: taskkill /f /im python.exe (Windows)
  • βœ… Use different port: python application.py --port 5002
πŸ“¦ "Module not found"

Cause: Missing dependencies or virtual environment

Solutions:

  • βœ… Activate virtual environment: venv\Scripts\activate
  • βœ… Reinstall: pip install -r requirements.txt
  • βœ… Check Python version: python --version (3.8+ required)

πŸš€ Development Roadmap

🟒 Current Version (application.py)

Feature Status
Basic transcript extraction βœ… Complete
Gemini AI integration βœ… Complete
Web interface βœ… Complete
Text-based search βœ… Complete
Zero setup complexity βœ… Complete

🟑 Future Version (app.py)

Feature Status
Vector embeddings πŸ”„ In Progress
Pinecone integration πŸ”„ Planned
Advanced RAG πŸ”„ Planned
Semantic search πŸ”„ Planned
Multi-video chat πŸ”„ Planned

πŸ“‹ Requirements

  • Python: 3.8 or higher
  • API Key: Google AI (free tier available)
  • Internet: Required for YouTube access
  • Videos: Must have captions/subtitles

🀝 Contributing

We welcome contributions! Here's how:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch: git checkout -b feature/amazing-feature
  3. πŸ’Ύ Commit changes: git commit -m 'Add amazing feature'
  4. πŸ“€ Push to branch: git push origin feature/amazing-feature
  5. πŸ”„ Open a Pull Request

🎯 Areas for Contribution

  • πŸ› Bug fixes
  • ✨ New features
  • πŸ“š Documentation improvements
  • πŸ§ͺ Test coverage
  • 🎨 UI/UX enhancements

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ’¬ Support & Community

⭐ Show Your Support

If this project helped you, please consider:

  • ⭐ Starring the repository
  • πŸ› Reporting bugs
  • πŸ’‘ Suggesting features
  • 🀝 Contributing code

Built with ❀️ using Google Gemini AI

⬆️ Back to Top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors