Skip to content

Instantly share code, notes, and snippets.

@m1ndy
Created March 1, 2023 06:57
Show Gist options
  • Save m1ndy/8dc51447300e6922619920ed192e324b to your computer and use it in GitHub Desktop.
Save m1ndy/8dc51447300e6922619920ed192e324b to your computer and use it in GitHub Desktop.
Auto-transcribe all mp4 video files in a folder with Whisper (running on MacOS with M1 Max, though this is CPU based model)
for mp4 in *.mp4
do
echo "Processing $mp4"
ffmpeg -i $mp4 -ar 16000 -ac 1 -c:a pcm_s16le $mp4.wav
~/Documents/Dev/whisper.cpp-1.2.1/main -m ~/Documents/Dev/whisper.cpp-1.2.1/models/ggml-large.bin -osrt -t 8 -f "$mp4.wav"
rm $mp4.wav
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment