-
Notifications
You must be signed in to change notification settings - Fork 2
/
example_service_file.service
23 lines (20 loc) · 1.53 KB
/
example_service_file.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[Unit]
Description=Whisper Simple Dictation Service
[Service]
Type=simple
Environment="WAYLAND_DISPLAY=wayland-0"
Environment="DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus"
; the sudo tee ... command serves to indicate that the engine is running using some LED
; feel free to tweak it or remove it
; if you keep it, add this to the sudoers file:
; ALL ALL=NOPASSWD: /usr/bin/tee /sys/class/leds/platform\:\:mute/brightness
ExecStart=/bin/bash /home/USERNAME/apps/whisper-simple-dictation/run_dictation_auto_off.sh en --on-callback 'echo 1 | sudo tee /sys/class/leds/platform::mute/brightness' --off-callback 'echo 0 | sudo tee /sys/class/leds/platform::mute/brightness' --auto-off-time 120 --model medium
Restart=no
[Install]
WantedBy=default.target
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; alternative ExecStart, in case you don't want to add your user to the input group
; but then, remember to add this rule to your sudoers file:
; ALL ALL=(ALL) NOPASSWD: SETENV: /bin/bash /home/filip/apps/whisper-simple-dictation/run_dictation_auto_off.sh *
; you will need to tweak --recording-device name - sd.query_devices() will list all available devices
; ExecStart=/usr/bin/sudo -E /bin/bash /home/USERNAME/apps/whisper-simple-dictation/run_dictation_auto_off.sh en --on-callback 'echo 1 | sudo tee /sys/class/leds/platform::mute/brightness' --off-callback 'echo 0 | sudo tee /sys/class/leds/platform::mute/brightness' --auto-off-time 120 --model medium --recording-device "sof-hda-dsp: - (hw:1,6)"