Giter Club home page Giter Club logo

audio-summarizer's Introduction

Audio Summary

Generate summaries of audio data from audio files, urls, and youtube videos. Two command-line scripts are provided: get-summary.py and get-text.py. The Whisper model is used for speech-to-text and GPT-3.5/GPT-4 is used for generating summaries.

Summaries

get-summary.py can be used to generate summaries for any text. For example, python src/get-summary.py -i path/to/audio.mp3 will print out a summary of the speech

Setup

First, clone this repo

git clone --recurse-submodules https://github.com/Dando18/audio-summarizer.git

Then build whisper.cpp.

cd tpl/whisper.cpp

# build whisper
# cublas, opencl, coreml, etc. 
# see https://github.com/ggerganov/whisper.cpp for backends
WHISPER_OPENBLAS=1 make -j

# download model(s)
# current options: tiny.en tiny base.en base small.en small medium.en medium
#                  large-v1 large-v2 large-v3
# see https://github.com/ggerganov/whisper.cpp for all options
make large-v3

Run

To get a summary for my-audio.wav you can run:

# create a cache for saving intermediate data
mkdir -p cache

python src/get-summary.py \
    --input my-audio.wav \
    --output summary.txt \
    --model-path tpl/whisper.cpp/models/ggml-large-v3.bin \
    --n-threads 4 \
    --prompt 'Summarize the following text: {text}' \
    --max-tokens 4096 \
    --cache-dir cache \
    --openai-model gpt-4-0125-preview

audio-summarizer's People

Contributors

dando18 avatar

Watchers

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