Skip to content

The YouTube AI Transcriber & Processor is a Python tool that extracts and analyzes YouTube video transcriptions using the Groq AI model, enabling content summarization and sentiment analysis. πŸš€

Notifications You must be signed in to change notification settings

saadtariq10/youtube-transcriber

Repository files navigation

YouTube AI Transcriber & Processor

YouTube AI Transcriber & Processor GIF

Overview

This project extracts transcriptions from YouTube videos and processes them using the Groq AI model. It utilizes the youtube_transcript_api to fetch video subtitles and sends the transcribed text to an AI model for further analysis.

Features

  • Extracts transcriptions from YouTube videos using youtube_transcript_api.
  • Processes the extracted text using Groq's AI model (llama-3.3-70b-versatile).
  • Allows customization of AI behavior via a system prompt file.
  • Supports configurable parameters such as temperature, max_tokens, and top_p for AI-generated responses.

Installation

Prerequisites

  • Python 3.8+
  • pip
  • A valid Groq API key

Setup

  1. Clone the repository:
    git clone [https://github.com/saadtariq10/youtube-transcriber.git]
    cd youtube-transcriber
    
  2. Install dependencies:
    pip install -r requirements.txt
  3. Create a .env file and add your Groq API key:
    GROQ_API_KEY=your_api_key_here
    
  4. Ensure you have a system_prompt.txt file in the project directory containing your desired system message for the AI.

Usage

  1. Run the main script with a YouTube video URL:
    python main.py
  2. The script will:
    • Extract the video ID from the provided URL.
    • Retrieve and process the transcription.
    • Send the transcription to the AI model for further analysis.
    • Display the processed output.

Code Structure

project_root/
β”œβ”€β”€ main.py                # Main execution script
β”œβ”€β”€ transcribe_module.py   # Handles YouTube transcription
β”œβ”€β”€ ai_model.py           # AI processing module
β”œβ”€β”€ system_prompt.txt     # Customizable AI prompt
β”œβ”€β”€ .env                  # API key storage (not included in repo)
β”œβ”€β”€ requirements.txt      # List of dependencies

Dependencies

  • groq
  • python-dotenv
  • youtube_transcript_api
  • re

Install dependencies using:

pip install -r requirements.txt

License

This project is licensed under the MIT License. See LICENSE for more details.

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss your ideas.

Author

Saad Tariq

About

The YouTube AI Transcriber & Processor is a Python tool that extracts and analyzes YouTube video transcriptions using the Groq AI model, enabling content summarization and sentiment analysis. πŸš€

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages