aboutsummaryrefslogtreecommitdiff
path: root/working/meeting-transcription-service/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'working/meeting-transcription-service/systemd')
-rw-r--r--working/meeting-transcription-service/systemd/meeting-transcribe.path12
-rw-r--r--working/meeting-transcription-service/systemd/meeting-transcribe.service9
2 files changed, 21 insertions, 0 deletions
diff --git a/working/meeting-transcription-service/systemd/meeting-transcribe.path b/working/meeting-transcription-service/systemd/meeting-transcribe.path
new file mode 100644
index 0000000..821b292
--- /dev/null
+++ b/working/meeting-transcription-service/systemd/meeting-transcribe.path
@@ -0,0 +1,12 @@
+[Unit]
+Description=Watch the meeting-transcription queue for new jobs
+
+[Path]
+# incoming/ only ever holds complete jobs: the client uploads into uploading/ and
+# renames the finished folder across. So "not empty" always means real work, and the
+# worker emptying the folder is what lets this unit go quiet again.
+DirectoryNotEmpty=%h/.local/state/meeting-transcribe/incoming
+MakeDirectory=yes
+
+[Install]
+WantedBy=default.target
diff --git a/working/meeting-transcription-service/systemd/meeting-transcribe.service b/working/meeting-transcription-service/systemd/meeting-transcribe.service
new file mode 100644
index 0000000..92f5ef4
--- /dev/null
+++ b/working/meeting-transcription-service/systemd/meeting-transcribe.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Transcribe queued meeting recordings (whisper + pyannote)
+
+[Service]
+Type=oneshot
+ExecStart=%h/.local/share/pyannote-diarize/src/transcribe-worker
+# The pyannote model is cached after its first download; never reach for the network.
+Environment=HF_HUB_OFFLINE=1
+Nice=5