summaryrefslogtreecommitdiffstats
path: root/roles/caption/templates/caption.sh
diff options
context:
space:
mode:
Diffstat (limited to 'roles/caption/templates/caption.sh')
-rwxr-xr-xroles/caption/templates/caption.sh18
1 files changed, 0 insertions, 18 deletions
diff --git a/roles/caption/templates/caption.sh b/roles/caption/templates/caption.sh
deleted file mode 100755
index 9600a3c..0000000
--- a/roles/caption/templates/caption.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-# {{ ansible_managed }}
-FILE="$1"
-MODEL="${2:small}"
-AUDIO=$(basename "$FILE" | sed s/\\.[a-z][a-z][a-z][a-z]?$//).ogg
-if [[ ! -f $AUDIO ]]; then
- if [[ "$FILE" == *webm ]]; then
- ffmpeg -y -i "$FILE" -acodec copy -vn $AUDIO
- else
- ffmpeg -y -i "$FILE" -acodec libvorbis -vn $AUDIO
- fi
-fi
-date > $AUDIO-$MODEL.log
-time whisper $AUDIO --model $MODEL --threads 12 >> $AUDIO-$MODEL.log
-for EXT in vtt txt srt; do
- mv $AUDIO.$EXT $(basename -s .webm.$EXT $AUDIO.$EXT)
-done
-date >> $AUDIO-$MODEL.log