A simple tool for generating subtitles using OpenAI Whisper 📔
Prerequisites:
- Linux
- Git
- Docker
- ffmpeg
- BrewKit
Firstly, clone the repository into your $GOPATH
:
mkdir -p $GOPATH/src/github.com/nightnoryu
cd $GOPATH/src/github.com/nightnoryu
git clone --recurse-submodules git@github.com:nightnoryu/gosubs.git
cd gosubs
Then build the binary:
brewkit build
First build may take a while, because we're building whisper.cpp bindings for Go, but subsequent builds will be much faster, harnessing the power of brewkit image caching.
TODO: update
After getting the binary (either by building or from the releases page), you need to download the Whisper model. You can use the provided script for that or download the model from HuggingFace yourself: https://huggingface.co/ggerganov/whisper.cpp
Then you can use gosubs
as follows:
gosubs --model ggml-medium.bin input.mp4 output.mp4