An audio summarizer (faster-whisper and BART glued together)
This repository has been archived on 2025-09-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
2024-08-13 21:20:28 +02:00
.gitignore Add project files 2024-08-13 20:32:46 +02:00
audio-summarize.py Add minimum values for --summin, --summax and --segmax 2024-08-13 21:20:28 +02:00
LICENSE Initial commit 2024-08-13 20:29:07 +02:00
README.md Add minimum values for --summin, --summax and --segmax 2024-08-13 21:20:28 +02:00
requirements.txt Add project files 2024-08-13 20:32:46 +02:00
setup.sh Add project files 2024-08-13 20:32:46 +02:00

audio-summarize

An audio summarizer that glues together ffmpeg, whisper.cpp and BART.

Dependencies

  • Python 3 (tested: 3.12)
  • ffmpeg
  • git
  • make & c/c++ compiler

Setup

Create a virtual environment for python and activate it:

python3 -m venv .venv
source .venv/bin/activate

Run setup.sh

./setup.sh

Run

  1. You need a whisper.cpp compatible model file (-> https://huggingface.co/ggerganov/whisper.cpp)
  2. In your terminal, make shure you have your python venv activated
  3. Run audio-summarize.py

Usage

audio-summarize.py -m filepath -i filepath -o filepath
                    [--summin n] [--summax n] [--segmax n]

options:
  -h, --help   show this help message and exit
  --summin n   The minimum lenght of a segment summary [10, min: 5]
  --summax n   The maximum lenght of a segment summary [90, min: 5]
  --segmax n   The maximum number of tokens per segment [375, 5 - 500]
  -m filepath  The path to a whisper.cpp-compatible model file
  -i filepath  The path to the media file
  -o filepath  Where to save the output text to

Example:

./audio-summarize.py -m ./tmp/whisper_ggml-small.en-q5_1.bin -i ./tmp/test.webm -o ./tmp/output.txt