summaryrefslogtreecommitdiffstats
path: root/roles/caption
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--roles/caption/tasks/main.yml2
-rwxr-xr-xroles/caption/templates/process-captions.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/roles/caption/tasks/main.yml b/roles/caption/tasks/main.yml
index fea78f4..d3ee4c0 100644
--- a/roles/caption/tasks/main.yml
+++ b/roles/caption/tasks/main.yml
@@ -18,7 +18,7 @@
- torchaudio
- num2words
- name: Set up aeneas
- include: aeneas.yml
+ include_tasks: aeneas.yml
- name: Create group
group:
name: "{{ emacsconf_group }}"
diff --git a/roles/caption/templates/process-captions.py b/roles/caption/templates/process-captions.py
index a42439b..fde766c 100755
--- a/roles/caption/templates/process-captions.py
+++ b/roles/caption/templates/process-captions.py
@@ -114,8 +114,8 @@ def extract_audio(work):
log("Extracting audio from %s acodec %s" % (work['video'], acodec))
output = subprocess.check_output(['ffmpeg', '-y', '-i', work['video'], '-acodec', acodec, '-vn', new_file], stderr=subprocess.STDOUT)
work['audio'] = new_file
- if os.path.isfile("/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh"):
- subprocess.call(["/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh", work['audio']])
+ if os.path.isfile("/data/emacsconf/admin/{{ emacsconf_year }}/scripts/upload.sh"):
+ subprocess.call(["/data/emacsconf/admin/{{ emacsconf_year }}/scripts/upload.sh", work['audio']])
return work
def to_sec(time_str):
@@ -150,8 +150,8 @@ def generate_captions(work):
txt_writer(result, work['audio'], {'max_line_width': 60, 'max_line_count': None, 'highlight_words': None})
work['vtt'] = new_file
work['txt'] = work['base'] + '.txt'
- if os.path.isfile("/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh"):
- subprocess.call(["/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh", work['vtt'], work['txt']])
+ if os.path.isfile("/data/emacsconf/admin/{{ emacsconf_year }}/scripts/upload.sh"):
+ subprocess.call(["/data/emacsconf/admin/{{ emacsconf_year }}/scripts/upload.sh", work['vtt'], work['txt']])
if 'srv2' in work: del work['srv2']
return work