Created
November 11, 2022 17:42
-
-
Save mprymek/c753c6aa2ec94b35d030494ccace89ad to your computer and use it in GitHub Desktop.
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
# How to upgrade Porcupine 1.9.x installed by Rhasspy 2.5.11 DEB to version 2.x | |
sudo su - | |
# Install Rhasspy 2.5.11 (replace "armel" with your architecture if needed) | |
wget https://github.com/rhasspy/rhasspy/releases/download/v2.5.11/rhasspy_armel.deb | |
dpkg -i rhasspy_armel.deb | |
# If you have Rhasspy already installed, just stop it. | |
systemctl stop rhasspy | |
# Install latest Porcupine. | |
apt update | |
apt install -y python3-pip | |
pip3 install pvporcupine | |
# Set installed Porcupine version in the variable below | |
porcupine_ver=2.1.4 | |
# Porcupine is installed in /usr/local/lib/python3.?/dist-packages/pvporcupine | |
# Check it: | |
echo /usr/local/lib/python3.?/dist-packages/pvporcupine | |
# If you see anything other than "python3.7" in the path, change "3.7" | |
# in the variable below to the version you see... | |
pyver=3.7 | |
# Move old Porcupine into ~/bcp-pvporcupine-1.9 and replace it with symlinks | |
# to the new version. | |
mkdir bcp-pvporcupine-1.9 | |
mv /usr/lib/rhasspy/usr/local/lib/python3.7/site-packages/pvporcupine-1.9.*.dist-info bcp-pvporcupine-1.9/ | |
mv /usr/lib/rhasspy/usr/local/lib/python3.7/site-packages/pvporcupine bcp-pvporcupine-1.9/ | |
ln -s /usr/local/lib/python$pyver/dist-packages/pvporcupine \ | |
/usr/lib/rhasspy/usr/local/lib/python3.7/site-packages/pvporcupine | |
ln -s /usr/local/lib/python$pyver/dist-packages/pvporcupine-$porcupine_ver.dist-info \ | |
/usr/lib/rhasspy/usr/local/lib/python3.7/site-packages/pvporcupine-$porcupine_ver.dist-info | |
# Patch Rhasspy. | |
curl https://gist.githubusercontent.com/mprymek/f72474052aa39687af266f572e76675e/raw/7c107124faf7d7a21bdc101ba2f27bf0f9fb0f36/rhasspy-porcupine-v2.diff \ | |
| patch -d / -p0 | |
# (optional) Put your custom wake word file to .config/rhasspy/profiles/en/porcupine | |
# | |
# Configure your Porcupine access key and your custom wake word file in your | |
# profile.json: | |
# "wake": { | |
# "porcupine": { | |
# "keyword_path": "hey-hilly_en_raspberry-pi_v2_1_0.ppn", | |
# "sensitivity": "0.6", | |
# "access_key": "blahblahblahblahblahblahblahblahblahblahblahblahblahbl==" | |
# }, | |
# "system": "porcupine" | |
# } | |
# If everything went well, you can now start Rhasspy. | |
systemctl start rhasspy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi, is this script supposed to work with porcupine 2.2.1 ?
i can't manage to make porcupine work when running rhasspy
(i've edited the variables pyver to 3.9 and porcupine_ver to 2.2.1):