This application uses OpenAI APIs to summarize YouTube videos. It downloads the audio stream of a YouTube video, transcribes the audio to text, and then summarizes the text transcript.
- Downloads the audio stream of a YouTube video using the
pytube
library. - Transcribes the audio to text using OpenAI's Whisper ASR system.
- Summarizes the text transcript using LangChain to prompt OpenAI's GPT-3.5 Turbo.
- Python 3.7 or higher
- OpenAI API key
- Clone the repository:
git clone https://github.com/your_username_/Project-Name.git
- Install the required packages:
pip install -r requirements.txt
- Create a
.env
file in the project root directory and add your OpenAI API key to it like this:OPENAI_API_KEY=your_api_key_here
. This project uses thedotenv
library to load this key into the environment variables.
To summarize a YouTube video, run the following command: python summarize.py {youtube_url}
The audio file, transcript, and summary will be saved to the /audio
, /transcripts
, and /summaries
folders respectively.
We welcome contributions! Please see the CONTRIBUTING.md file for how to contribute.
This project is licensed under the MIT license - see the LICENSE file for more details.