summaryrefslogtreecommitdiffstats
path: root/roles/caption
diff options
context:
space:
mode:
Diffstat (limited to 'roles/caption')
-rw-r--r--roles/caption/tasks/main.yml19
-rwxr-xr-xroles/caption/templates/process-captions.py2
2 files changed, 12 insertions, 9 deletions
diff --git a/roles/caption/tasks/main.yml b/roles/caption/tasks/main.yml
index d3ee4c0..96b3198 100644
--- a/roles/caption/tasks/main.yml
+++ b/roles/caption/tasks/main.yml
@@ -6,17 +6,20 @@
- cmake
- jq
- inotify-tools
+ - pipx
- name: Install whisper
- ansible.builtin.pip:
+ community.general.pipx:
name: git+https://github.com/openai/whisper.git
- name: Install Python packages
- ansible.builtin.pip:
- name:
- - lhotse
- - webvtt-py
- - tqdm
- - torchaudio
- - num2words
+ community.general.pipx:
+ name: "{{ item }}"
+ install_deps: true
+ loop:
+ - lhotse
+ - webvtt-py
+ - tqdm
+ - torchaudio
+ - num2words
- name: Set up aeneas
include_tasks: aeneas.yml
- name: Create group
diff --git a/roles/caption/templates/process-captions.py b/roles/caption/templates/process-captions.py
index fde766c..bdbfa1e 100755
--- a/roles/caption/templates/process-captions.py
+++ b/roles/caption/templates/process-captions.py
@@ -40,7 +40,7 @@ import json
import torch
THREADS = {{ cpus }}
-VIDEO_REGEXP = '\\.(webm|mov|mp4|mkv)$'
+VIDEO_REGEXP = '\\.(webm|mov|mp4|mkv|mpv)$'
AUDIO_REGEXP = '\\.(ogg|opus)$'
ALWAYS = False
TRIM_AUDIO = False