Let's say you have video.mov
file in English.
First, convert it to the WAV format, with the help of ffmpeg:
ffmpeg -i video.mov -ar 16000 -ac 1 -c:a pcm_s16le video.wav
Then, install whisper.cpp and
download its medium
model.
Then, get English subtitles:
cd /code/whisper.cpp
build/bin/whisper-cli --model models/ggml-medium.bin \
--file video.wav --no-prints --best-of 7 \
--output-srt --language en \
--output-file english \
--print-progress --processors 6
You will get english.srt
file.
Then, install chatgpt-subtitle-translator,
in the /code
directory.
Then, generate Russian subtitles:
cd /code/chatgpt-subtitle-translator
cli/translator.mjs --from english --to russian \
--stream --temperature 0 \
--input english.srt --output russian.srt
Finally, you will get the russian.srt
file.