YouTube Video Transcript AI

Rithik

Rithik Gour

YouTube Video Transcript AI

This project creates an AI agent that can generate transcripts from YouTube videos and enables users to interact with the content. The application allows for searching within the transcript, summarizing key points, and extracting timestamps for specific phrases or keywords.

Features

Transcript Generation: Convert YouTube video audio to text with timestamps
Search: Find specific keywords or phrases within the transcript
Summary: Generate concise summaries of video content
Key Points: Extract important keywords and phrases
Interactive UI: User-friendly interface built with Streamlit

Prerequisites

Python 3.8+
API Keys:
YouTube Data API
OpenAI API (for Whisper speech-to-text and GPT for summarization)

Installation

Clone the repository or download the source code
Create a virtual environment:
python -m venv venv
Activate the virtual environment:
# On Windows
venv\Scripts\activate

# On macOS/Linux
source venv/bin/activate
Install the required packages:
pip install -r requirements.txt
Create a .env file in the root directory with your API keys:
YOUTUBE_API_KEY=your_youtube_api_key
OPENAI_API_KEY=your_openai_api_key

Usage

Run the Streamlit app:
streamlit run app.py
Open your web browser and navigate to the provided URL (typically http://localhost:8501)
Enter a YouTube URL in the input field
The app will:
Download the video's audio
Transcribe it using OpenAI's Whisper API
Allow you to search the transcript, generate summaries, and extract keywords

Technical Details

This project uses:
pytube for downloading YouTube videos
openai for transcription (Whisper) and summarization (GPT)
streamlit for the web interface
pydub for audio processing

Limitations

Video length: Very long videos may be challenging to process due to API limitations
Audio quality: Poor audio quality may affect transcription accuracy
API costs: Using OpenAI's API incurs costs based on usage

Future Improvements

Add more language support for transcription
Implement topic segmentation for longer videos
Add sentiment analysis of video content
Support batch processing of multiple videos
Like this project

Posted May 1, 2025

Created an AI for YouTube video transcript generation and interaction.