summaryrefslogtreecommitdiffstats
path: root/roles/prerec/templates/run-aeneas.sh
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-11-05 08:02:44 -0400
committerSacha Chua <sacha@sachachua.com>2022-11-05 08:02:44 -0400
commit5bf4ab50e13a9be2923ddebe69525b40df8ab3bc (patch)
treec06ff0086d94135871e30981fa80a9112f990cf4 /roles/prerec/templates/run-aeneas.sh
parent5f83a3fbeb91dea9c77925e83b09b27427435cb9 (diff)
downloademacsconf-ansible-5bf4ab50e13a9be2923ddebe69525b40df8ab3bc.tar.xz
emacsconf-ansible-5bf4ab50e13a9be2923ddebe69525b40df8ab3bc.zip
Separate caption and prerec roles
Diffstat (limited to 'roles/prerec/templates/run-aeneas.sh')
-rwxr-xr-xroles/prerec/templates/run-aeneas.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/prerec/templates/run-aeneas.sh b/roles/prerec/templates/run-aeneas.sh
new file mode 100755
index 0000000..6f40134
--- /dev/null
+++ b/roles/prerec/templates/run-aeneas.sh
@@ -0,0 +1,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