summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-10-21 12:28:07 -0400
committerSacha Chua <sacha@sachachua.com>2022-10-21 12:28:07 -0400
commitf636dd1ef7593a60aa8c287fb0346045a321cbc5 (patch)
treec52ec8a1c780313e7a7951ea41dc473c30887f04
parent21b051177dc5897d239e6532f5f245a32f7dfb36 (diff)
downloademacsconf-ansible-f636dd1ef7593a60aa8c287fb0346045a321cbc5.tar.xz
emacsconf-ansible-f636dd1ef7593a60aa8c287fb0346045a321cbc5.zip
Add captioning tools
-rw-r--r--README.org7
-rw-r--r--common-playbook.yml6
-rw-r--r--inventory.yml4
-rw-r--r--roles/caption/tasks/main.yml8
-rw-r--r--roles/stream/tasks/main.yml3
5 files changed, 27 insertions, 1 deletions
diff --git a/README.org b/README.org
index 3645b04..ad335d0 100644
--- a/README.org
+++ b/README.org
@@ -155,3 +155,10 @@ ansible-playbook -i inventory.yml prod-playbook.yml --tags test-stream-file -e i
Play the stream with MPV:
ansible-playbook -i inventory.yml prod-playbook.yml --tags test-stream-mpv -e icecast_test_track=dev
+
+ansible-playbook -i inventory.yml prod-playbook.yml --tags test-stream-pattern -e icecast_test_track=dev
+* Captioning
+
+Set up whisper
+
+ansible-playbook -i inventory.yml prod-playbook.yml --tags caption
diff --git a/common-playbook.yml b/common-playbook.yml
index 819db36..388d84f 100644
--- a/common-playbook.yml
+++ b/common-playbook.yml
@@ -34,4 +34,8 @@
tags: stream
roles:
- stream
-
+- name: Set up captioning tools
+ hosts: res
+ tags: caption
+ roles:
+ - caption
diff --git a/inventory.yml b/inventory.yml
index 8dfee04..6608342 100644
--- a/inventory.yml
+++ b/inventory.yml
@@ -1,5 +1,9 @@
prod:
hosts:
+ res:
+ ansible_host: res.emacsconf.org
+ ansible_python_interpreter: /usr/bin/python3
+ ansible_become: true
front:
ansible_host: front0.emacsconf.org
remote_user: orga
diff --git a/roles/caption/tasks/main.yml b/roles/caption/tasks/main.yml
new file mode 100644
index 0000000..7b6534a
--- /dev/null
+++ b/roles/caption/tasks/main.yml
@@ -0,0 +1,8 @@
+- name: Install packages
+ package:
+ name:
+ - python3-pip
+ - ffmpeg
+- name: Install whisper
+ ansible.builtin.pip:
+ name: git+https://github.com/openai/whisper.git
diff --git a/roles/stream/tasks/main.yml b/roles/stream/tasks/main.yml
index 73040d6..b5ebcda 100644
--- a/roles/stream/tasks/main.yml
+++ b/roles/stream/tasks/main.yml
@@ -44,6 +44,9 @@
- name: Test by displaying the stream in mpv
tags: test-stream-mpv, never
local_action: shell mpv http://live0.emacsconf.org:{{ icecast_port }}/emacsconf/{{ icecast_test_track|d(gen) }}.webm
+- name: Test by streaming a test pattern
+ tags: test-stream-pattern, never
+ local_action: shell ffmpeg -loglevel 32 -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 -f webm icecast://emacsconf:{{ icecast_emacsconf_password }}@live0.emacsconf.org:{{ icecast_port }}/emacsconf/{{ icecast_test_track|d("gen") }}.webm
# - name: Set up restream script
# template:
# src: restream-yt.sh