From 4f8f4e2ebc76eac371a2ef287600aefd250dfd93 Mon Sep 17 00:00:00 2001 From: imonlinux <39863321+imonlinux@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:14:58 -0700 Subject: [PATCH] Add user mode service files for pipewire support --- ...ux-voice-assistant.service.service.service | 21 +++++++++++++++ ...-oww-linux-voice-assistant.service.service | 26 +++++++++++++++++++ .../user-wyoming-openwakeword.service.service | 25 ++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 service/user-pw-mww-linux-voice-assistant.service.service.service create mode 100644 service/user-pw-oww-linux-voice-assistant.service.service create mode 100644 service/user-wyoming-openwakeword.service.service diff --git a/service/user-pw-mww-linux-voice-assistant.service.service.service b/service/user-pw-mww-linux-voice-assistant.service.service.service new file mode 100644 index 0000000..e0ffd03 --- /dev/null +++ b/service/user-pw-mww-linux-voice-assistant.service.service.service @@ -0,0 +1,21 @@ +[Unit] +Description=Linux Voice Assistant (PipeWire + MWW) +After=pipewire.service pipewire-pulse.service +Wants=pipewire-pulse.service + +[Service] +Type=simple +WorkingDirectory=/home/pi/linux-voice-assistant +Environment=PYTHONUNBUFFERED=1 + +ExecStart=/home/pi/linux-voice-assistant/script/run \ + --name 'Linux Satellite PW MWW' \ + --audio-input-device default \ + --audio-output-device pulse/alsa_output.platform-soc_sound.stereo-fallback \ + --debug + +Restart=always +RestartSec=2 + +[Install] +WantedBy=default.target diff --git a/service/user-pw-oww-linux-voice-assistant.service.service b/service/user-pw-oww-linux-voice-assistant.service.service new file mode 100644 index 0000000..e7f02b0 --- /dev/null +++ b/service/user-pw-oww-linux-voice-assistant.service.service @@ -0,0 +1,26 @@ +[Unit] +Description=Linux Voice Assistant (PipeWire + OWW) +After=pipewire.service pipewire-pulse.service wyoming-openwakeword.service +Wants=pipewire-pulse.service wyoming-openwakeword.service +Requires=wyoming-openwakeword.service +After=wyoming-openwakeword.service + +[Service] +Type=simple +WorkingDirectory=/home/pi/linux-voice-assistant +Environment=PYTHONUNBUFFERED=1 + +ExecStart=/home/pi/linux-voice-assistant/script/run \ + --name 'Linux Satellite Test PW' \ + --audio-input-device default \ + --audio-output-device pulse/alsa_output.platform-soc_sound.stereo-fallback \ + --wake-uri 'tcp://127.0.0.1:10400' \ + --wake-word-name 'alexa' \ + --wake-models-dir '/home/pi/wyoming-openwakeword/wyoming_openwakeword/models' \ + --debug + +Restart=always +RestartSec=2 + +[Install] +WantedBy=default.target diff --git a/service/user-wyoming-openwakeword.service.service b/service/user-wyoming-openwakeword.service.service new file mode 100644 index 0000000..56af08a --- /dev/null +++ b/service/user-wyoming-openwakeword.service.service @@ -0,0 +1,25 @@ +[Unit] +Description=Wyoming openWakeWord + +[Service] +Type=simple +WorkingDirectory=/home/pi/wyoming-openwakeword + +ExecStart=/usr/bin/env bash -lc '\ + cd /home/pi/wyoming-openwakeword && \ + exec ./script/run \ + --uri tcp://0.0.0.0:10400 \ + --models-dir /home/pi/wyoming-openwakeword/wyoming_openwakeword/models \ + \ + --preload-model alexa_v0.1 --threshold 0.5 --trigger-level 3 \ + --preload-model hey_jarvis_v0.1 --threshold 0.5 --trigger-level 3 \ + --preload-model hey_mycroft_v0.1 --threshold 0.5 --trigger-level 3 \ + --preload-model hey_rhasspy_v0.1 --threshold 0.5 --trigger-level 3 \ + --preload-model ok_nabu_v0.1 --threshold 0.5 --trigger-level 3 \ +' + +Restart=always +RestartSec=2 + +[Install] +WantedBy=default.target