Audio Video 2 Text

Extract Audio

ffmpeg -i input.mp4 -ar 16000 -ac 1 output.wav

Transcripe to text

pocketsphinx_continuous -infile output.wav >/tmp/out.txt

Do a whole bunch

#!/bin/bash

for file in *.mp4; do

ffmpeg -i "$file" -ar 16000 -ac 1 "${file%.mp4}.wav"

pocketsphinx_continuous -infile "${file%.mp4}.wav" >"${file%.mp4}.txt"

done

  

📝 📜 ⏱️ ⬆️