The GPT Summarization App is a powerful tool designed to streamline the process of extracting and summarising content from YouTube videos. By leveraging the capabilities of OpenAI's Whisper model for accurate transcription and the GPT-3.5 API for concise summarisation, this app offers a seamless workflow for users to input a YouTube URL and receive a summarised text of the video's audio content.
- YouTube Audio Download: Automatically downloads the audio track of any YouTube video provided via URL.
- Audio Transcription: Utilises the Whisper model for state-of-the-art audio transcription, ensuring high accuracy in converting speech to text.
- Content Summarisation: Leverages the GPT-3.5 API to produce clear, concise summaries of the transcribed text, making it easy to capture the essence of the video content.
-
Clone this repo
-
Create a virtual environment with
venv
python -m venv .venv && source .venv/bin/activate && python -m pip install --upgrade pip
-
Install dependencies
pip install -r requirements.txt
-
Install homebrew
-
Install
ffmpeg
withbrew install ffmpeg
-
Download the
spacy
model:python -m spacy download en_core_web_sm
-
Install
insanely-fast-whisper
for transcriptions:pipx install insanely-fast-whisper --force --pip-args="--ignore-requires-python"
-
Create
.env
in root directory and add your OpenAI API key:OPENAI_API_KEY='add your OpenAI API key here' # https://platform.openai.com/account/api-keys
-
Run the app from the command line, passing the YouTube URL as an argument. To download and transcribe a Youtube video, run this command:
python -m gpt_summariser.download_and_transcribe <youtube_url>
-
To download and summarise a Youtube video, run this command:
python -m gpt_summariser.download_and_summarise <youtube_url> <title>
.
├── LICENSE
├── README.md
├── gpt_summariser
│ ├── __init__.py
│ ├── download_and_summarise.py
│ ├── download_and_transcribe.py
│ ├── download_yt_audio.py
│ ├── summarise_transcript.py
│ ├── transcribe_audio.py
│ └── utils.py
├── outputs
│ ├── audio
│ ├── summaries
│ └── transcripts
└── requirements.txt
- Download the YouTube video as a
wav
audio file - Transcribe audio file using OpenAI's Whisper model to
txt
orvtt
formats - Summarise the transcript using free models from HuggingFace
- Transcribe audio file using
insanely-fast-whisper
anddistil-whisper
for faster transcriptions - Add documentation
- Add tests
- Use free open-source models for summarisation instead of GPT3.5
- Add speaker diarisation support
- If the YouTube URL is in the
youtu.be
format, then convert it to the/watch?v=
format - Output transcripts and summaries into logseq
markdown
format - Add front-end UI
- Add support for
pdf
andepub
formats - Batch downloads and summarisations
- Dockerise app
Contributions are welcome! If you'd like to improve the GPT Summarisation App, please fork the repository and submit a pull request with your proposed changes.
This project is licensed under the MIT License - see the LICENSE.md
file for details.