SRT-subtitle translator

SRT-subtitle translator is a program or script which can help you make a translation for a video. At first you need to make an original srt-file, which can do using Kdenlive. YouTube has a good video about that.

Speech to Text


The script:

### RJP 11.11.2023
time=$(date "+%F-%H-%M-%S")
yad --width=1000 --text='Choose srt-file for translating. File selection opens when you close this window.'
sleep 0,1
OLD=`yad --file --width=1000`
yad --width=1000 --text='Choose text-file for making a new translated srt-file. You may have made the file by hand or you may have made it using artificial intelligence.'
sleep 0,1
NEW=`yad --file --width=1000`
sed '1i\\' $NEW > /tmp/NEWFILE2
sed -r '/^\s*$/d' $OLD > /tmp/NEWFILE
sed '1d' /tmp/NEWFILE2 | sed -e '3~3{R /dev/stdin' -e 'd;}' /tmp/NEWFILE > /tmp/
awk '{ print; } NR % 3 == 0 { print ""; }' /tmp/ > $HOME/file-$
yad --width=1000 --text='New translation has made from your text-file. You can use the file when you watching the video or you can burn the text to video using program like Kdenlive. You find the file from your home directory as'
cd /tmp && rm NEWFILE NEWFILE2

Read also: