summaryrefslogblamecommitdiffstats
path: root/roles/prerec/templates/run-aeneas.sh
blob: 6f401340c08f93651f710d7e7c7ae46964c4bfc8 (plain) (tree)
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-2022-.*?--.*?--.*?)--.*/$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/2022/scripts/upload.sh ${BASE}--main.vtt