summaryrefslogtreecommitdiffstats
path: root/roles/prerec/templates/run-aeneas.sh
blob: 8246c8595ebb55a1d72aed2710027cc3071ab1c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/bash
#
# {{ ansible_managed }}
#
AUDIO=$(ls *.opus *.ogg | head -n1)
BASE=$(echo $AUDIO | perl -pe 's/^(emacsconf-{{ emacsconf_year }}-.*?--.*?--.*?)--.*/$1/')
echo $AUDIO
echo $BASE
if [ ! -f $BASE--whisper.vtt ]; then
  cp ${BASE}--main.vtt ${BASE}--whisper.vtt
fi
python3 -m aeneas.tools.execute_task $AUDIO *.txt "task_language=eng|os_task_file_format=vtt|is_text_type=plain" ${BASE}--aeneas.vtt
cp ${BASE}--aeneas.vtt ${BASE}--main.vtt
/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh ${BASE}--main.vtt