-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
60 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Documentation=https://github.com/OpenVoiceOS/ovos-audio-transformer-plugin-ggwave | ||
Description=Open Voice OS - ggwave listener | ||
PartOf=ovos.service | ||
Requires=ovos.service ovos-messagebus.service | ||
|
||
[Service] | ||
WorkingDirectory=/home/pi/.venvs/ovos | ||
ExecStart=/home/pi/.venvs/ovos/bin/ovos-ggwave-listener | ||
ExecReload=/usr/bin/kill -s HUP $MAINPID | ||
ExecStop=/usr/bin/kill -s KILL $MAINPID | ||
Restart=on-failure | ||
RestartSec=5s | ||
StartLimitBurst=0 | ||
|
||
[Install] | ||
WantedBy=ovos.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# Exit on error | ||
# If something goes wrong just stop. | ||
# it allows the user to see issues at once rather than having | ||
# scroll back and figure out what went wrong. | ||
set -e | ||
|
||
apt install -y pipewire pipewire-alsa alsa-utils | ||
|
||
# Replace 'your_user' with the actual username | ||
USER="pi" | ||
SOUND_SERVER="pipewire" | ||
|
||
|
||
# Add user to audio group | ||
sudo usermod -aG audio $USER | ||
|
||
# Add user to rtkit group if it exists | ||
if getent group rtkit > /dev/null 2>&1; then | ||
sudo usermod -aG rtkit $USER | ||
fi | ||
|
||
# Add user to pipewire group | ||
sudo usermod -aG pipewire $USER | ||
|
||
# Enable lingering for the user | ||
sudo loginctl enable-linger $USER | ||
|
||
echo -e "pcm.!default $SOUND_SERVER\nctl.!default $SOUND_SERVER" > /home/$USER/.asoundrc | ||
sudo chown $USER:$USER /home/$USER/.asoundrc | ||
echo ".asoundrc file generated for $USER" |