Git Product home page Git Product logo

gpt-summariser's Introduction

GPT Summarisation App

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.

Features

  • 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.

Getting Started on MacOS

  1. Clone this repo

  2. Create a virtual environment with venv

    python -m venv .venv && source .venv/bin/activate && python -m pip install --upgrade pip
  3. Install dependencies

    pip install -r requirements.txt
  4. Install homebrew

  5. Install ffmpeg with brew install ffmpeg

  6. Download the spacy model:

    python -m spacy download en_core_web_sm
  7. Install insanely-fast-whisper for transcriptions:

    pipx install insanely-fast-whisper --force --pip-args="--ignore-requires-python"
  8. 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

Usage

  • 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>

Repo structure

.
├── 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

TODO

  • Download the YouTube video as a wav audio file
  • Transcribe audio file using OpenAI's Whisper model to txt or vtt formats
  • Summarise the transcript using free models from HuggingFace
  • Transcribe audio file using insanely-fast-whisper and distil-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 and epub formats
  • Batch downloads and summarisations
  • Dockerise app

Contributing

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.

License

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

gpt-summariser's People

Contributors

vince-lam avatar

Stargazers

rye avatar Vladimiro Bellini avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.